com.atlassian.confluence.json.json
Class JsonObject

java.lang.Object
  extended by com.atlassian.confluence.json.json.JsonObject
All Implemented Interfaces:
Json

public class JsonObject
extends java.lang.Object
implements Json


Constructor Summary
JsonObject()
           
 
Method Summary
 java.lang.String serialize()
          Returns a JSON-format string representation of this object.
 JsonObject setProperty(java.lang.String key, java.util.Date date)
           
 JsonObject setProperty(java.lang.String key, Json json)
           
 JsonObject setProperty(java.lang.String key, java.lang.Number number)
           
 JsonObject setProperty(java.lang.String key, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonObject

public JsonObject()
Method Detail

serialize

public java.lang.String serialize()
Description copied from interface: Json
Returns a JSON-format string representation of this object.

The string must evaluate in a Javascript engine; i.e. it must be a valid RHS for the Javascript expression: { data : RHS }

Thus, nulls, booleans, numbers, strings, arrays and objects should be supported by implementing classes.

Closures must not be returned with this method.

Specified by:
serialize in interface Json
Returns:
json-format representation of this object
See Also:
RFC 4627 - JSON specification

setProperty

public JsonObject setProperty(java.lang.String key,
                              Json json)

setProperty

public JsonObject setProperty(java.lang.String key,
                              java.lang.String value)

setProperty

public JsonObject setProperty(java.lang.String key,
                              java.lang.Number number)

setProperty

public JsonObject setProperty(java.lang.String key,
                              java.util.Date date)


Copyright © 2003-2010 Atlassian. All Rights Reserved.