org.compass.core.json.jackson
Class JacksonJsonObject

java.lang.Object
  extended by org.compass.core.json.jackson.JacksonJsonObject
All Implemented Interfaces:
JsonObject
Direct Known Subclasses:
JacksonAliasedJsonObject

public class JacksonJsonObject
extends Object
implements JsonObject

A simple JsonObject implementation that works with the JacksonContentConverter parser.

Author:
kimchy

Constructor Summary
JacksonJsonObject(Map<String,Object> nodes)
           
 
Method Summary
 Map<String,Object> getNodes()
           
 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

JacksonJsonObject

public JacksonJsonObject(Map<String,Object> nodes)
Method Detail

getNodes

public Map<String,Object> getNodes()

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-2009 The Compass Project.