public class JSONWrappedObject extends Object implements JsonSerializableWithType
JSONPObject
Modifier and Type | Field and Description |
---|---|
protected String |
_prefix
Literal String to output before serialized value.
|
protected JavaType |
_serializationType
Optional static type to use for serialization; if null, runtime
type is used.
|
protected String |
_suffix
Literal String to output after serialized value.
|
protected Object |
_value
Value to be serialized as JSONP padded; can be null.
|
Constructor and Description |
---|
JSONWrappedObject(String prefix,
String suffix,
Object value) |
JSONWrappedObject(String prefix,
String suffix,
Object value,
Class<?> rawType)
Deprecated.
Since 1.8; should construct with resolved
JavaType ,
to ensure type has been properly resolved |
JSONWrappedObject(String prefix,
String suffix,
Object value,
JavaType asType) |
Modifier and Type | Method and Description |
---|---|
String |
getPrefix() |
JavaType |
getSerializationType() |
String |
getSuffix() |
Object |
getValue() |
void |
serialize(JsonGenerator jgen,
SerializerProvider provider) |
void |
serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer) |
protected final String _prefix
protected final String _suffix
protected final Object _value
protected final JavaType _serializationType
public JSONWrappedObject(String prefix, String suffix, Object value, JavaType asType)
@Deprecated public JSONWrappedObject(String prefix, String suffix, Object value, Class<?> rawType)
JavaType
,
to ensure type has been properly resolvedpublic void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonProcessingException
serializeWithType
in interface JsonSerializableWithType
IOException
JsonProcessingException
public void serialize(JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException
serialize
in interface JsonSerializable
IOException
JsonProcessingException
public String getPrefix()
public String getSuffix()
public Object getValue()
public JavaType getSerializationType()