public final class PolymorphicSerialization extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PolymorphicSerialization.Deserializer |
static class |
PolymorphicSerialization.Serializer |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
deserializeCompound(Class<T> type,
org.codehaus.jackson.JsonNode arrayNode,
int currentIndex,
org.codehaus.jackson.map.DeserializationContext deserializationContext)
Deserializes object of specified type using provided parser.
|
static <T> T |
deserializeCompound(org.codehaus.jackson.JsonNode node,
org.codehaus.jackson.map.DeserializationContext deserializationContext)
Deserializes object from provided JSON node.
|
static void |
serializeCompound(Object o,
org.codehaus.jackson.JsonGenerator jsonGenerator)
Serializes provided object as a compound type (incl.
|
public static void serializeCompound(Object o, org.codehaus.jackson.JsonGenerator jsonGenerator) throws IOException
o - object to be serialized (may be null)jsonGenerator - generatorIOException - thrown when object may not be serializedpublic static <T> T deserializeCompound(org.codehaus.jackson.JsonNode node,
org.codehaus.jackson.map.DeserializationContext deserializationContext)
throws IOException
null, String or compound value
in format of [class, value].T - type of value to be readnode - JSON node to be interpreteddeserializationContext - contextIOException - thrown when read is not possiblepublic static <T> T deserializeCompound(Class<T> type, org.codehaus.jackson.JsonNode arrayNode, int currentIndex, org.codehaus.jackson.map.DeserializationContext deserializationContext) throws IllegalAccessException, InstantiationException, IOException
T - type of value to be readtype - expected type of valuedeserializationContext - contextIOException - thrown when read is not possibleIllegalAccessExceptionInstantiationExceptionCopyright © 2018. All rights reserved.