playn.flash.json.impl
Class JreJsonObject

java.lang.Object
  extended by playn.flash.json.impl.JreJsonValue
      extended by playn.flash.json.impl.JreJsonObject
All Implemented Interfaces:
JsonObject, JsonValue

public class JreJsonObject
extends JreJsonValue
implements JsonObject

Server-side implementation of JsonObject.


Constructor Summary
JreJsonObject(JsonFactory factory)
           
 
Method Summary
<T extends JsonValue>
T
get(String key)
           
 Object getObject()
           
 JsonType getType()
          Returns an enumeration representing the fundamental JSON type.
 boolean hasKey(String key)
           
 boolean jsEquals(JsonValue value)
          Equivalent of Javascript '==' operator comparison between two values.
 String[] keys()
           
 void put(String key, boolean bool)
           
 void put(String key, double value)
           
 void put(String key, JsonValue value)
           
 void put(String key, String value)
           
 void remove(String key)
           
 String toJson()
          Returns a serialized JSON string representing this value.
 String toString()
           
 void traverse(playn.flash.json.impl.JsonVisitor visitor, playn.flash.json.impl.JsonContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JreJsonObject

public JreJsonObject(JsonFactory factory)
Method Detail

get

public <T extends JsonValue> T get(String key)
Specified by:
get in interface JsonObject

getObject

public Object getObject()
Specified by:
getObject in class JreJsonValue

getType

public JsonType getType()
Description copied from interface: JsonValue
Returns an enumeration representing the fundamental JSON type.

Specified by:
getType in interface JsonValue

hasKey

public boolean hasKey(String key)
Specified by:
hasKey in interface JsonObject

keys

public String[] keys()
Specified by:
keys in interface JsonObject

put

public void put(String key,
                JsonValue value)
Specified by:
put in interface JsonObject

put

public void put(String key,
                String value)
Specified by:
put in interface JsonObject

put

public void put(String key,
                double value)
Specified by:
put in interface JsonObject

put

public void put(String key,
                boolean bool)
Specified by:
put in interface JsonObject

remove

public void remove(String key)
Specified by:
remove in interface JsonObject

jsEquals

public boolean jsEquals(JsonValue value)
Description copied from interface: JsonValue
Equivalent of Javascript '==' operator comparison between two values.

Specified by:
jsEquals in interface JsonValue

toJson

public String toJson()
Description copied from interface: JsonValue
Returns a serialized JSON string representing this value.

Specified by:
toJson in interface JsonValue
Returns:

toString

public String toString()
Overrides:
toString in class Object

traverse

public void traverse(playn.flash.json.impl.JsonVisitor visitor,
                     playn.flash.json.impl.JsonContext ctx)
Specified by:
traverse in class JreJsonValue


Copyright © 2011. All Rights Reserved.