Example usage for Java io.vertx.core.json JsonObject fields, constructors, methods, implement or subclass
The text is from its open source code.
JsonObject() Create a new, empty instance | |
JsonObject(String json) Create an instance from a string of JSON | |
JsonObject(Map Create an instance from a Map. | |
JsonObject(Buffer buf) Create an instance from a buffer. |
boolean | containsKey(String key) Does the JSON object contain the specified key? |
JsonObject | copy() Copy the JSON object |
String | encode() Encode this JSON object as a string. |
String | encodePrettily() Encode this JSON object a a string, with whitespace to make the object easier to read by a human, or other sentient organism. |
Set | fieldNames() Return the set of field names in the JSON objects |
byte[] | getBinary(String key) Get the binary value with the specified key. |
byte[] | getBinary(String key, byte[] def) Like #getBinary(String) but specifying a default value to return if there is no entry. |
Boolean | getBoolean(String key, Boolean def) Like #getBoolean(String) but specifying a default value to return if there is no entry. |
Boolean | getBoolean(String key) Get the Boolean value with the specified key |
Double | getDouble(String key) Get the Double value with the specified key |
Double | getDouble(String key, Double def) Like #getDouble(String) but specifying a default value to return if there is no entry. |
Integer | getInteger(String key) Get the Integer value with the specified key |
Integer | getInteger(String key, Integer def) Like #getInteger(String) but specifying a default value to return if there is no entry. |
JsonArray | getJsonArray(String key) Get the JsonArray value with the specified key |
JsonArray | getJsonArray(String key, JsonArray def) Like #getJsonArray(String) but specifying a default value to return if there is no entry. |
JsonObject | getJsonObject(String key) Get the JsonObject value with the specified key |
JsonObject | getJsonObject(String key, JsonObject def) Like #getJsonObject(String) but specifying a default value to return if there is no entry. |
Long | getLong(String key) Get the Long value with the specified key |
Long | getLong(String key, Long def) Like #getLong(String) but specifying a default value to return if there is no entry. |
Map | getMap() Get the underlying Map as is. |
String | getString(String key) Get the string value with the specified key, special cases are addressed for extended JSON types Instant , byte[] and Enum which can be converted to String. |
String | getString(String key, String def) Like #getString(String) but specifying a default value to return if there is no entry. |
Object | getValue(String key) Get the value with the specified key, as an Object with types respecting the limitations of JSON. |
boolean | isEmpty() Is this object entry? |
JsonObject | mapFrom(Object obj) Create a JsonObject from the fields of a Java object. |
T | mapTo(Class Instantiate a Java object from a JsonObject. |
JsonObject | mergeIn(JsonObject other) Merge in another JSON object. |
JsonObject | put(String key, Object value) Put an Object into the JSON object with the specified key. |
JsonObject | putNull(String key) Put a null value into the JSON object with the specified key. |
Object | remove(String key) Remove an entry from this object. |
int | size() Get the number of entries in the JSON object |
Stream | stream() Get a stream of the entries in the JSON object. |
Buffer | toBuffer() Encode this JSON object as buffer. |
String | toString() |