public class SortedSetSerializer extends ParameterizedTypeSerializer<java.util.SortedSet>
SortedSet
instances.BIGDECIMAL_SERIALIZER, BIGINTEGER_SERIALIZER, BOOLEAN_SERIALIZER, BYTEARRAY_SERIALIZER, DOUBLE_SERIALIZER, FLOAT_SERIALIZER, INTEGER_SERIALIZER, LONG_SERIALIZER, mapper, SHORT_SERIALIZER, STRING_SERIALIZER
Constructor and Description |
---|
SortedSetSerializer()
Create a new serializer for
SortedSet type. |
Modifier and Type | Method and Description |
---|---|
java.util.SortedSet |
fromJson(java.util.SortedSet arg,
java.lang.String sval)
Parse the string JSON representation and assign it to the given argument.
|
java.util.SortedSet |
initialize(java.lang.Class<? extends java.util.SortedSet> definitionType)
Create an initial (default) instance for this serializer.
|
com.fasterxml.jackson.databind.JsonNode |
toJson(java.util.SortedSet val)
Serialize the given instance to JSON.
|
getSafeParameter, setParameters
fromJson, getSerializer, getSerializer, getType, newInstance, newRecord, readArray, readArray, readArray, readMap, resolveJavaType, toJsonArray, toJsonObject
public SortedSetSerializer()
SortedSet
type.public java.util.SortedSet initialize(java.lang.Class<? extends java.util.SortedSet> definitionType) throws java.lang.InstantiationException, java.lang.IllegalAccessException
Can be null for non-mutable instances.
initialize
in class JavaTypeSerializer<java.util.SortedSet>
definitionType
- The type as it appears at the parameter's definition.null
for immutable types, a Java native value for native types or a new instance,
for mutable types.java.lang.InstantiationException
java.lang.IllegalAccessException
public java.util.SortedSet fromJson(java.util.SortedSet arg, java.lang.String sval) throws RequestArgumentError
fromJson
in class JavaTypeSerializer<java.util.SortedSet>
arg
- The argument (obtained via initialize(java.lang.Class<? extends java.util.SortedSet>)
.sval
- The string JSON representation of this argument.RequestArgumentError
- If the argument can't be parsed.public com.fasterxml.jackson.databind.JsonNode toJson(java.util.SortedSet val)
toJson
in class JavaTypeSerializer<java.util.SortedSet>
val
- The instance to serialize.