net.jangaroo.extxml.json
Class JsonObject
java.lang.Object
net.jangaroo.extxml.json.JsonObject
- All Implemented Interfaces:
- Json
public class JsonObject
- extends Object
- implements Json
JsonObject
public JsonObject()
getTypePropertyName
public String getTypePropertyName()
setTypePropertyName
public void setTypePropertyName(String typePropertyName)
getType
public String getType()
setType
public void setType(String type)
isEmpty
public boolean isEmpty()
toString
public String toString()
- Overrides:
toString in class Object
toString
public String toString(int indentFactor)
- Make a prettyprinted JSON text of this JSONObject.
Warning: This method assumes that the data structure is acyclical.
- Parameters:
indentFactor - The number of spaces to add to each level of
indentation.
- Returns:
- a printable, displayable, portable, transmittable
representation of the object, beginning
with
{ (left brace) and ending
with } (right brace).
quote
public static String quote(String string)
- Produce a string in double quotes with backslash sequences in all the
right places. A backslash will be inserted within , allowing JSON
text to be delivered in HTML. In JSON text, a string cannot contain a
control character or an unescaped quote or backslash.
- Parameters:
string - A String
- Returns:
- A String correctly formatted for insertion in a JSON text.
toString
public String toString(int indentFactor,
int indent)
- Make a prettyprinted JSON text of this JSONObject.
Warning: This method assumes that the data structure is acyclical.
- Specified by:
toString in interface Json
- Parameters:
indentFactor - The number of spaces to add to each level of
indentation.indent - The indentation of the top level.
- Returns:
- a printable, displayable, transmittable
representation of the object, beginning
with
{ (left brace) and ending
with } (right brace).
get
public Object get(String property)
- Specified by:
get in interface Json
set
public void set(String property,
Object value)
- Specified by:
set in interface Json
remove
public Object remove(String property)
Copyright © 2002-2011 CoreMedia AG. All Rights Reserved.