public interface JsonObject extends JsonValue
Modifier and Type | Method and Description |
---|---|
<T extends JsonValue> |
get(String key)
Return the element (uncoerced) as a JsonValue.
|
JsonArray |
getArray(String key)
Return the element (uncoerced) as a JsonArray.
|
boolean |
getBoolean(String key)
Return the element (uncoerced) as a boolean.
|
double |
getNumber(String key)
Return the element (uncoerced) as a number.
|
JsonObject |
getObject(String key)
Return the element (uncoerced) as a JsonObject If the type is not an object,,
this can result in runtime errors.
|
String |
getString(String key)
Return the element (uncoerced) as a String.
|
boolean |
hasKey(String key)
Test whether a given key has present.
|
String[] |
keys()
All keys of the object.
|
void |
put(String key,
boolean bool)
Set a given key to the given boolean value.
|
void |
put(String key,
double value)
Set a given key to the given double value.
|
void |
put(String key,
JsonValue value)
Set a given key to the given value.
|
void |
put(String key,
String value)
Set a given key to the given String value.
|
void |
remove(String key)
Remove a given key and associated value from the object.
|
JsonArray getArray(String key)
boolean getBoolean(String key)
double getNumber(String key)
JsonObject getObject(String key)
String getString(String key)
String[] keys()
void put(String key, double value)
void put(String key, boolean bool)
boolean hasKey(String key)
void remove(String key)
key
- Copyright © 2018. All rights reserved.