Java io.vertx.core.json JsonObject fields, constructors, methods, implement or subclass

Example usage for Java io.vertx.core.json JsonObject fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for io.vertx.core.json JsonObject.

The text is from its open source code.

Subclass

io.vertx.core.json.JsonObject has subclasses.
Click this link to see all its subclasses.

Constructor

JsonObject()
Create a new, empty instance
JsonObject(String json)
Create an instance from a string of JSON
JsonObject(Map map)
Create an instance from a Map.
JsonObject(Buffer buf)
Create an instance from a buffer.

Method

booleancontainsKey(String key)
Does the JSON object contain the specified key?
JsonObjectcopy()
Copy the JSON object
Stringencode()
Encode this JSON object as a string.
StringencodePrettily()
Encode this JSON object a a string, with whitespace to make the object easier to read by a human, or other sentient organism.
SetfieldNames()
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.
BooleangetBoolean(String key, Boolean def)
Like #getBoolean(String) but specifying a default value to return if there is no entry.
BooleangetBoolean(String key)
Get the Boolean value with the specified key
DoublegetDouble(String key)
Get the Double value with the specified key
DoublegetDouble(String key, Double def)
Like #getDouble(String) but specifying a default value to return if there is no entry.
IntegergetInteger(String key)
Get the Integer value with the specified key
IntegergetInteger(String key, Integer def)
Like #getInteger(String) but specifying a default value to return if there is no entry.
JsonArraygetJsonArray(String key)
Get the JsonArray value with the specified key
JsonArraygetJsonArray(String key, JsonArray def)
Like #getJsonArray(String) but specifying a default value to return if there is no entry.
JsonObjectgetJsonObject(String key)
Get the JsonObject value with the specified key
JsonObjectgetJsonObject(String key, JsonObject def)
Like #getJsonObject(String) but specifying a default value to return if there is no entry.
LonggetLong(String key)
Get the Long value with the specified key
LonggetLong(String key, Long def)
Like #getLong(String) but specifying a default value to return if there is no entry.
MapgetMap()
Get the underlying Map as is.
StringgetString(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.
StringgetString(String key, String def)
Like #getString(String) but specifying a default value to return if there is no entry.
ObjectgetValue(String key)
Get the value with the specified key, as an Object with types respecting the limitations of JSON.
booleanisEmpty()
Is this object entry?
JsonObjectmapFrom(Object obj)
Create a JsonObject from the fields of a Java object.
TmapTo(Class type)
Instantiate a Java object from a JsonObject.
JsonObjectmergeIn(JsonObject other)
Merge in another JSON object.
JsonObjectput(String key, Object value)
Put an Object into the JSON object with the specified key.
JsonObjectputNull(String key)
Put a null value into the JSON object with the specified key.
Objectremove(String key)
Remove an entry from this object.
intsize()
Get the number of entries in the JSON object
Stream>stream()
Get a stream of the entries in the JSON object.
BuffertoBuffer()
Encode this JSON object as buffer.
StringtoString()