public abstract class BoxJsonObject extends BoxObject implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.LinkedHashMap<java.lang.String,java.lang.Object> |
mProperties |
| Constructor and Description |
|---|
BoxJsonObject()
Constructs an empty BoxJSONObject.
|
BoxJsonObject(java.util.Map<java.lang.String,java.lang.Object> map)
Constructs a BoxJsonObject with the provided map values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createFromJson(com.eclipsesource.json.JsonObject object)
Creates the BoxJsonObject from a JsonObject
|
void |
createFromJson(java.lang.String json)
Serializes a json blob into a BoxJsonObject.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getPropertiesAsHashMap()
Gets properties of the BoxJsonObject as a HashMap.
|
protected void |
parseJSONMember(com.eclipsesource.json.JsonObject.Member member)
Invoked with a JSON member whenever this object is updated or created from a JSON object.
|
protected com.eclipsesource.json.JsonValue |
parseJsonObject(java.util.Map.Entry<java.lang.String,java.lang.Object> entry) |
void |
parseNullJsonMember(com.eclipsesource.json.JsonObject.Member member)
Handle parsing of null member objects from createFromJson method.
|
java.lang.String |
toJson()
Returns a JSON string representing the object.
|
protected com.eclipsesource.json.JsonObject |
toJsonObject() |
protected final java.util.LinkedHashMap<java.lang.String,java.lang.Object> mProperties
public BoxJsonObject()
public BoxJsonObject(java.util.Map<java.lang.String,java.lang.Object> map)
map - map of keys and values that will populate the object.public void createFromJson(java.lang.String json)
json - json blob to deserialize.public void createFromJson(com.eclipsesource.json.JsonObject object)
object - json object to parse.public void parseNullJsonMember(com.eclipsesource.json.JsonObject.Member member)
member - a member where getValue returns null.protected void parseJSONMember(com.eclipsesource.json.JsonObject.Member member)
Subclasses should override this method in order to parse any JSON members it knows about. This method is a no-op by default.
member - the JSON member to be parsed.public java.lang.String toJson()
protected com.eclipsesource.json.JsonObject toJsonObject()
protected com.eclipsesource.json.JsonValue parseJsonObject(java.util.Map.Entry<java.lang.String,java.lang.Object> entry)
public java.util.HashMap<java.lang.String,java.lang.Object> getPropertiesAsHashMap()