For example, an empty JSON object can be written as follows:
JsonWriter jsonWriter = new JsonWriter(...); jsonWriter.writeObject(new JsonObjectBuilder().build()); jsonWriter.close();
It uses {@link javax.json.stream.JsonGenerator} internally for writing.The generator is created using one of the {@link Json}'s {@code createGenerator} methods
@author Jitendra Kotamraju
|
|
|
|
|
|
|
|