Package org.h2.util.json
Class JSONObject
- java.lang.Object
-
- org.h2.util.json.JSONValue
-
- org.h2.util.json.JSONObject
-
public class JSONObject extends JSONValue
JSON object.
-
-
Constructor Summary
Constructors Constructor Description JSONObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addMember(java.lang.String name, JSONValue value)
Add a key-value pair.void
addTo(JSONTarget<?> target)
Appends this value to the specified target.JSONValue
getFirst(java.lang.String name)
Returns value of the first member with the specified name.java.util.Map.Entry<java.lang.String,JSONValue>[]
getMembers()
Returns the value.
-
-
-
Field Detail
-
members
private final java.util.ArrayList<java.util.AbstractMap.SimpleImmutableEntry<java.lang.String,JSONValue>> members
-
-
Method Detail
-
addMember
void addMember(java.lang.String name, JSONValue value)
Add a key-value pair.- Parameters:
name
- the keyvalue
- the value
-
addTo
public void addTo(JSONTarget<?> target)
Description copied from class:JSONValue
Appends this value to the specified target.
-
getMembers
public java.util.Map.Entry<java.lang.String,JSONValue>[] getMembers()
Returns the value.- Returns:
- the value
-
getFirst
public JSONValue getFirst(java.lang.String name)
Returns value of the first member with the specified name.- Parameters:
name
- name of the member- Returns:
- value of the first member with the specified name, or
null
-
-