|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.jackson.ObjectCodec
public abstract class ObjectCodec
Abstract class that defines the interface that JsonParser and
JsonGenerator use to serialize and deserialize regular
Java objects (POJOs aka Beans).
The standard implementation of this class is
ObjectMapper.
| Constructor Summary | |
|---|---|
protected |
ObjectCodec()
|
| Method Summary | ||
|---|---|---|
abstract JsonNode |
readTree(JsonParser jp)
Method to deserialize Json content as tree expressed using set of JsonNode instances. |
|
abstract
|
readValue(JsonParser jp,
java.lang.Class<T> valueType)
Method to deserialize Json content into a non-container type (it can be an array type, however): typically a bean, array or a wrapper type (like Boolean). |
|
abstract
|
readValue(JsonParser jp,
JavaType valueType)
Method to deserialize Json content as tree expressed using set of JsonNode instances. |
|
abstract
|
readValue(JsonParser jp,
TypeReference<?> valueTypeRef)
Method to deserialize Json content into a Java type, reference to which is passed as argument. |
|
abstract void |
writeTree(JsonGenerator jgen,
JsonNode rootNode)
Method to serialize given Json Tree, using generator provided. |
|
abstract void |
writeValue(JsonGenerator jgen,
java.lang.Object value)
Method to serialize given Java Object, using generator provided. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ObjectCodec()
| Method Detail |
|---|
public abstract <T> T readValue(JsonParser jp,
java.lang.Class<T> valueType)
throws java.io.IOException,
JsonProcessingException
Boolean).
Note: this method should NOT be used if the result type is a
container (Collection or Map.
The reason is that due to type erasure, key and value types
can not be introspected when using this method.
java.io.IOException
JsonProcessingException
public abstract <T> T readValue(JsonParser jp,
TypeReference<?> valueTypeRef)
throws java.io.IOException,
JsonProcessingException
java.io.IOException
JsonProcessingException
public abstract <T> T readValue(JsonParser jp,
JavaType valueType)
throws java.io.IOException,
JsonProcessingException
JsonNode instances. Returns
root of the resulting tree (where root can consist
of just a single node if the current event is a
value event, not container).
java.io.IOException
JsonProcessingException
public abstract JsonNode readTree(JsonParser jp)
throws java.io.IOException,
JsonProcessingException
JsonNode instances. Returns
root of the resulting tree (where root can consist
of just a single node if the current event is a
value event, not container).
java.io.IOException
JsonProcessingException
public abstract void writeValue(JsonGenerator jgen,
java.lang.Object value)
throws java.io.IOException,
JsonProcessingException
java.io.IOException
JsonProcessingException
public abstract void writeTree(JsonGenerator jgen,
JsonNode rootNode)
throws java.io.IOException,
JsonProcessingException
java.io.IOException
JsonProcessingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||