public class OrgJsonValueSerialization extends Object implements ValueSerialization
This class is used internally by the Zest Runtime to provide default ValueSerialization when no ValueSerialization Service is available.
     In application code, prefer the use of OrgJsonValueSerializationService.
 
ValueSerialization.FormatsValueSerializer.Options| Constructor and Description | 
|---|
OrgJsonValueSerialization(Application application,
                         Module module,
                         Module valuesModule)  | 
| Modifier and Type | Method and Description | 
|---|---|
<T> Function2<ValueType,String,T> | 
deserialize()
Factory method for an untyped deserialize function. 
 | 
<T> T | 
deserialize(Class<?> type,
           InputStream input)
Deserialize a value from a state. 
 | 
<T> T | 
deserialize(Class<?> type,
           String input)
Deserialize a value from a state. 
 | 
<T> Function<String,T> | 
deserialize(Class<T> type)
Factory method for a typed deserialize function. 
 | 
<T> Function<String,T> | 
deserialize(ValueType valueType)
Factory method for a typed deserialize function. 
 | 
<T> T | 
deserialize(ValueType type,
           InputStream input)
Deserialize a value from a state. 
 | 
<T> T | 
deserialize(ValueType type,
           String input)
Deserialize a value from a state. 
 | 
<T> Function<T,String> | 
serialize()
Factory method for a serialize function. 
 | 
<T> Function<T,String> | 
serialize(boolean includeTypeInfo)
Deprecated.  
 | 
String | 
serialize(Object object)
Serialize the state of a value with type information. 
 | 
String | 
serialize(Object object,
         boolean includeTypeInfo)
Deprecated.  
 | 
void | 
serialize(Object object,
         OutputStream output)
Serialize the state of a value with type information. 
 | 
void | 
serialize(Object object,
         OutputStream output,
         boolean includeTypeInfo)
Deprecated.  
 | 
<T> Function<T,String> | 
serialize(ValueSerializer.Options options)
Factory method for a serialize function. 
 | 
String | 
serialize(ValueSerializer.Options options,
         Object object)
Serialize the state of a value. 
 | 
void | 
serialize(ValueSerializer.Options options,
         Object object,
         OutputStream output)
Serialize the state of a value. 
 | 
public OrgJsonValueSerialization(Application application, Module module, Module valuesModule)
public <T> Function<T,String> serialize()
ValueSerializerserialize in interface ValueSerializerT - the parametrized function input typepublic <T> Function<T,String> serialize(ValueSerializer.Options options)
ValueSerializerserialize in interface ValueSerializerT - the parametrized function input typeoptions - ValueSerializer Options@Deprecated public <T> Function<T,String> serialize(boolean includeTypeInfo)
ValueSerializerserialize in interface ValueSerializerT - the parametrized function input typeincludeTypeInfo - if type information should be included in the outputpublic String serialize(Object object) throws ValueSerializationException
ValueSerializerserialize in interface ValueSerializerobject - an Object to serializeValueSerializationException - if the Value serialization failedpublic String serialize(ValueSerializer.Options options, Object object) throws ValueSerializationException
ValueSerializerserialize in interface ValueSerializeroptions - ValueSerializer Optionsobject - an Object to serializeValueSerializationException - if the Value serialization failed@Deprecated public String serialize(Object object, boolean includeTypeInfo) throws ValueSerializationException
ValueSerializerserialize in interface ValueSerializerobject - an Object to serializeincludeTypeInfo - if type information should be included in the outputValueSerializationException - if the Value serialization failedpublic void serialize(Object object, OutputStream output) throws ValueSerializationException
ValueSerializerserialize in interface ValueSerializerobject - an Object to serializeoutput - that will be used as outputValueSerializationException - if the Value serialization failedpublic void serialize(ValueSerializer.Options options, Object object, OutputStream output) throws ValueSerializationException
ValueSerializerserialize in interface ValueSerializeroptions - ValueSerializer Optionsobject - an Object to serializeoutput - that will be used as outputValueSerializationException - if the Value serialization failed@Deprecated public void serialize(Object object, OutputStream output, boolean includeTypeInfo) throws ValueSerializationException
ValueSerializerserialize in interface ValueSerializerobject - an Object to serializeoutput - that will be used as outputincludeTypeInfo - if type information should be included in the outputValueSerializationException - if the Value serialization failedpublic <T> Function<String,T> deserialize(Class<T> type)
ValueDeserializerThe returned Function may throw ValueSerializationException.
deserialize in interface ValueDeserializerT - the parametrized function return typetype - the value typepublic <T> Function<String,T> deserialize(ValueType valueType)
ValueDeserializerThe returned Function may throw ValueSerializationException.
deserialize in interface ValueDeserializerT - the parametrized function return typevalueType - the value typepublic <T> Function2<ValueType,String,T> deserialize()
ValueDeserializerThe returned Function may throw ValueSerializationException.
deserialize in interface ValueDeserializerT - the parametrized function return typepublic <T> T deserialize(Class<?> type, String input) throws ValueSerializationException
ValueDeserializerdeserialize in interface ValueDeserializerT - the parametrized returned typetype - the value typeinput - the stateValueSerializationException - if the deserialization failedpublic <T> T deserialize(ValueType type, String input) throws ValueSerializationException
ValueDeserializerdeserialize in interface ValueDeserializerT - the parametrized returned typetype - the value typeinput - the stateValueSerializationException - if the deserialization failedpublic <T> T deserialize(Class<?> type, InputStream input) throws ValueSerializationException
ValueDeserializerdeserialize in interface ValueDeserializerT - the parametrized returned typetype - the value typeinput - the state streamValueSerializationException - if the deserialization failedpublic <T> T deserialize(ValueType type, InputStream input) throws ValueSerializationException
ValueDeserializerdeserialize in interface ValueDeserializerT - the parametrized returned typetype - the value typeinput - the state streamValueSerializationException - if the deserialization failed