net.jangaroo.extxml.json
Class JsonObject

java.lang.Object
  extended by net.jangaroo.extxml.json.JsonObject
All Implemented Interfaces:
Json

public class JsonObject
extends Object
implements Json


Constructor Summary
JsonObject()
           
 
Method Summary
 Object get(String property)
           
 String getType()
           
 String getTypePropertyName()
           
 boolean isEmpty()
           
static String quote(String string)
          Produce a string in double quotes with backslash sequences in all the right places.
 Object remove(String property)
           
 void set(String property, Object value)
           
 void setType(String type)
           
 void setTypePropertyName(String typePropertyName)
           
 String toString()
           
 String toString(int indentFactor)
          Make a prettyprinted JSON text of this JSONObject.
 String toString(int indentFactor, int indent)
          Make a prettyprinted JSON text of this JSONObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JsonObject

public JsonObject()
Method Detail

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
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.