Jackson2 Module which allows reading/writing io.vertx.core.json.JsonObject
<repositories>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<dependency>
<groupId>de.crunc</groupId>
<artifactId>jackson-datatype-vertx</artifactId>
<version>2.1-SNAPSHOT</version>
</dependency>
ObjectMapper mapper = new ObjectMapper();
ObjectMarshaller marshaller = new ObjectMarshaller(mapper);
SamplePojo pojo = new SamplePojo("Foobar");
JsonObject json = marshaller.marshall(pojo);
ObjectMapper mapper = new ObjectMapper();
ObjectMarshaller marshaller = new ObjectMarshaller(mapper);
JsonObject json = new JsonObject();
json.putString("message", "Hello pojo");
SamplePojo pojo = marshaller.unmarshall(json, SamplePojo.class);
ObjectMapper mapper = new ObjectMapper();
om.registerModule(new VertxJsonModule());
String jsonObject = mapper.writeValueAsString(new JsonObject());
String jsonArray = mapper.writeValueAsString(new JsonArray());
ObjectMapper mapper = new ObjectMapper();
om.registerModule(new VertxJsonModule());
JsonObject object = mapper.readValue("{}", JsonObject.class);
JsonArray object = mapper.readValue("[]", JsonArray.class);