public abstract class BoxJSONObject extends Object
BoxResource.Info
and its subclasses. Changes made to a BoxJSONObject will be tracked
locally until the pending changes are sent back to Box in order to avoid unnecessary network requests.Constructor and Description |
---|
BoxJSONObject()
Constructs an empty BoxJSONObject.
|
BoxJSONObject(String json)
Constructs a BoxJSONObject by decoding it from a JSON string.
|
Modifier and Type | Method and Description |
---|---|
void |
clearPendingChanges()
Clears any pending changes from this JSON object.
|
String |
getJson()
Converts the JSON object into a string literal.
|
String |
getPendingChanges()
Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.
|
JsonObject |
getPendingChangesAsJsonObject()
Gets a JSON string containing any pending changes to this object that can be sent back to the Box API.
|
protected JsonObject |
getPendingJSONObject()
Gets a JsonObject containing any pending changes to this object that can be sent back to the Box API.
|
public BoxJSONObject()
public BoxJSONObject(String json)
json
- the JSON string to decode.public void clearPendingChanges()
public String getPendingChanges()
public JsonObject getPendingChangesAsJsonObject()
protected JsonObject getPendingJSONObject()