org.compass.core.json.jackson.converter
Class JacksonContentConverter.ContentMapper

java.lang.Object
  extended by org.codehaus.jackson.map.BaseMapper
      extended by org.compass.core.json.jackson.converter.JacksonContentConverter.ContentMapper
Enclosing class:
JacksonContentConverter

public static class JacksonContentConverter.ContentMapper
extends org.codehaus.jackson.map.BaseMapper

A mapper from Json content (a String for example) to a JacksonJsonObject.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.BaseMapper
org.codehaus.jackson.map.BaseMapper.DupFields
 
Field Summary
 
Fields inherited from class org.codehaus.jackson.map.BaseMapper
_cfgBase64Variant, _cfgDupFields, _jsonFactory
 
Constructor Summary
JacksonContentConverter.ContentMapper(org.codehaus.jackson.JsonFactory jsonFactory)
           
 
Method Summary
protected  JacksonJsonObject _readMapAndClose(org.codehaus.jackson.JsonParser jp)
           
protected  Object readAndMap(org.codehaus.jackson.JsonParser jp, org.codehaus.jackson.JsonToken currToken)
           
 JacksonJsonObject readTree(org.codehaus.jackson.JsonParser jp)
          Method that will use the current event of the underlying parser (and if there's no event yet, tries to advance to an event) to construct a node, and advance the parser to point to the next event, if any.
 JacksonJsonObject readTree(String jsonContent)
           
 
Methods inherited from class org.codehaus.jackson.map.BaseMapper
_reportProblem, _throwInternal, getBase64Variant, getDupFieldHandling, getJsonFactory, setBase64Variant, setDupFieldHandling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JacksonContentConverter.ContentMapper

public JacksonContentConverter.ContentMapper(org.codehaus.jackson.JsonFactory jsonFactory)
Method Detail

readTree

public JacksonJsonObject readTree(String jsonContent)
                           throws IOException,
                                  org.codehaus.jackson.JsonParseException
Throws:
IOException
org.codehaus.jackson.JsonParseException

_readMapAndClose

protected JacksonJsonObject _readMapAndClose(org.codehaus.jackson.JsonParser jp)
                                      throws IOException,
                                             org.codehaus.jackson.JsonParseException
Throws:
IOException
org.codehaus.jackson.JsonParseException

readTree

public JacksonJsonObject readTree(org.codehaus.jackson.JsonParser jp)
                           throws IOException,
                                  org.codehaus.jackson.JsonParseException,
                                  org.codehaus.jackson.map.JsonMappingException
Method that will use the current event of the underlying parser (and if there's no event yet, tries to advance to an event) to construct a node, and advance the parser to point to the next event, if any. For structured tokens (objects, arrays), will recursively handle and construct contained nodes.

Throws:
IOException
org.codehaus.jackson.JsonParseException
org.codehaus.jackson.map.JsonMappingException

readAndMap

protected Object readAndMap(org.codehaus.jackson.JsonParser jp,
                            org.codehaus.jackson.JsonToken currToken)
                     throws IOException,
                            org.codehaus.jackson.JsonParseException
Throws:
IOException
org.codehaus.jackson.JsonParseException


Copyright (c) 2004-2009 The Compass Project.