net.jangaroo.exml.json
Class JsonObject

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

public class JsonObject
extends Object
implements Json


Constructor Summary
JsonObject(Object... namesAndValues)
           
 
Method Summary
 Object get(String property)
           
 String getWrapperClass()
           
 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)
           
 JsonObject settingWrapperClass(String wrapperClass)
           
 void settingWrapperClassConstructorCast(String fullName)
           
 String toString()
           
 String toString(int indentFactor)
          Make a pretty-printed 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(Object... namesAndValues)
Method Detail

getWrapperClass

public String getWrapperClass()

settingWrapperClass

public JsonObject settingWrapperClass(String wrapperClass)

isEmpty

public boolean isEmpty()

toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(int indentFactor)
Make a pretty-printed 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)

settingWrapperClassConstructorCast

public void settingWrapperClassConstructorCast(String fullName)


Copyright © 2002-2011 CoreMedia AG. All Rights Reserved.