I\'m thinking of something like:
String json = new JsonBuilder() .add(\"key1\", \"value1\") .add(\"key2\", \"value2\") .add(\"key3\", new JsonBuilder()
See the Java EE 7 Json specification. This is the right way:
String json = Json.createObjectBuilder() .add("key1", "value1") .add("key2", "value2") .build() .toString();