org.compass.core.json.jettison
Class JettisonJSONObject

java.lang.Object
  extended by org.compass.core.json.jettison.JettisonJSONObject
All Implemented Interfaces:
JsonObject
Direct Known Subclasses:
JettisonAliasedJSONObject

public class JettisonJSONObject
extends Object
implements JsonObject

A wrapper around jettison JSONObject.

Author:
kimchy

Constructor Summary
JettisonJSONObject(org.codehaus.jettison.json.JSONObject jsonObject)
           
JettisonJSONObject(String json)
           
 
Method Summary
 boolean isNullValue(Object value)
          Returns true if the given value is a null value.
 Iterator<String> keys()
          Returns a Map holding all the keys and value for the given Json Object.
 Object opt(String key)
          Returns the given object under the key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JettisonJSONObject

public JettisonJSONObject(String json)
                   throws org.codehaus.jettison.json.JSONException
Throws:
org.codehaus.jettison.json.JSONException

JettisonJSONObject

public JettisonJSONObject(org.codehaus.jettison.json.JSONObject jsonObject)
Method Detail

keys

public Iterator<String> keys()
Description copied from interface: JsonObject
Returns a Map holding all the keys and value for the given Json Object.

Specified by:
keys in interface JsonObject

opt

public Object opt(String key)
Description copied from interface: JsonObject
Returns the given object under the key. Returns null if nothing is registerd under the key.

Specified by:
opt in interface JsonObject

isNullValue

public boolean isNullValue(Object value)
Description copied from interface: JsonObject
Returns true if the given value is a null value.

Specified by:
isNullValue in interface JsonObject


Copyright (c) 2004-2008 The Compass Project.