public abstract class JsonNode
extends org.codehaus.jettison.json.JSONObject
JsonNode
class defines the API for interacting with JSON objects. Every JsonNode
knows how to
create their URL and create their JCR content.Modifier and Type | Method and Description |
---|---|
protected org.codehaus.jettison.json.JSONObject |
children() |
byte[] |
getContent() |
String |
getId() |
abstract URL |
getUrl() |
protected org.codehaus.jettison.json.JSONObject |
properties() |
String |
toString() |
protected JsonNode |
withChild(String name,
org.codehaus.jettison.json.JSONObject child) |
protected JsonNode |
withMixin(String mixin) |
protected JsonNode |
withPrimaryType(String primaryType) |
protected JsonNode |
withProperty(String key,
Object value) |
accumulate, append, doubleToString, get, getBoolean, getDouble, getInt, getJSONArray, getJSONObject, getLong, getString, has, isNull, keys, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOpt, quote, remove, toJSONArray, toString, write
protected JsonNode(String id)
id
- the node identifier (never null
)public byte[] getContent() throws Exception
Exception
- if there is a problem obtaining the node contentpublic String getId()
public abstract URL getUrl() throws Exception
Exception
- if there is a problem constructing the URLpublic String toString()
toString
in class org.codehaus.jettison.json.JSONObject
protected JsonNode withPrimaryType(String primaryType) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
protected JsonNode withMixin(String mixin) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
protected JsonNode withProperty(String key, Object value) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
protected JsonNode withChild(String name, org.codehaus.jettison.json.JSONObject child) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
protected org.codehaus.jettison.json.JSONObject children() throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
protected org.codehaus.jettison.json.JSONObject properties() throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.