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()
           
 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.
static String valueToString(Object value, int indentFactor, int indent)
          Make a prettyprinted JSON text of an object value.
 
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).

valueToString

public static String valueToString(Object value,
                                   int indentFactor,
                                   int indent)
Make a prettyprinted JSON text of an object value.

Warning: This method assumes that the data structure is acyclic.

Parameters:
value - The value to be serialized.
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).

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-2012 CoreMedia AG. All Rights Reserved.