| |
|
| org.restlet.resource.StringRepresentation org.restlet.ext.json.JsonRepresentation
JsonRepresentation | public class JsonRepresentation extends StringRepresentation (Code) | | Representation based on a JSON document. JSON stands for JavaScript Object
Notation and is a lightweight data-interchange format.
author: Jerome Louvel (contact@noelios.com) See Also: JSON home |
Method Summary | |
public JSONArray | toJsonArray() Converts the representation to a JSON array. | public JSONObject | toJsonObject() Converts the representation to a JSON object. |
JsonRepresentation | public JsonRepresentation(Representation jsonRepresentation) throws IOException(Code) | | Constructor.
Parameters: jsonRepresentation - A source JSON representation to parse. |
JsonRepresentation | public JsonRepresentation(JSONObject jsonObject)(Code) | | Constructor from a JSON object.
Parameters: jsonObject - The JSON object. |
JsonRepresentation | public JsonRepresentation(JSONArray jsonArray)(Code) | | Constructor from a JSON array.
Parameters: jsonArray - The JSON array. |
JsonRepresentation | public JsonRepresentation(String jsonString)(Code) | | Constructor from a JSON string.
Parameters: jsonString - The JSON string. |
toJsonArray | public JSONArray toJsonArray() throws JSONException(Code) | | Converts the representation to a JSON array.
The converted JSON array. throws: JSONException - |
toJsonObject | public JSONObject toJsonObject() throws JSONException(Code) | | Converts the representation to a JSON object.
The converted JSON object. throws: JSONException - |
|
|
|