com.fasterxml.jackson.databind.util.JSONPObject
| Modifier and Type | Field and Description |
|---|---|
| protected final String | _prefix
Literal String to output before serialized value. |
| protected final JavaType | _serializationType
Optional static type to use for serialization; if null, runtime type is used. |
| protected final String | _suffix
Literal String to output after serialized value. |
| protected final Object | _value
Value to be serialized as JSONP padded; can be null. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JSONWrappedObject(String prefix, String suffix, Object value, JavaType asType)
Constructor that should be used when specific serialization type to use is important, and needs to be passed instead of just using runtime (type-erased) type of the value. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public JavaType | |
| public String | |
| public Object | |
| public void | serialize(JsonGenerator jgen, SerializerProvider provider)
Implements com. |
| public void | serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer)
Implements com. |
| _prefix | back to summary |
|---|---|
| protected final String _prefix Literal String to output before serialized value. Will not be quoted when serializing value. | |
| _serializationType | back to summary |
|---|---|
| protected final JavaType _serializationType Optional static type to use for serialization; if null, runtime type is used. Can be used to specify declared type which defines serializer to use, as well as aspects of extra type information to include (if any). | |
| _suffix | back to summary |
|---|---|
| protected final String _suffix Literal String to output after serialized value. Will not be quoted when serializing value. | |
| _value | back to summary |
|---|---|
| protected final Object _value Value to be serialized as JSONP padded; can be null. | |
| JSONWrappedObject | back to summary |
|---|---|
| public JSONWrappedObject(String prefix, String suffix, Object value) | |
| JSONWrappedObject | back to summary |
|---|---|
| public JSONWrappedObject(String prefix, String suffix, Object value, JavaType asType) Constructor that should be used when specific serialization type to use is important, and needs to be passed instead of just using runtime (type-erased) type of the value. | |
| getPrefix | back to summary |
|---|---|
| public String getPrefix() | |
| getSerializationType | back to summary |
|---|---|
| public JavaType getSerializationType() | |
| getSuffix | back to summary |
|---|---|
| public String getSuffix() | |
| getValue | back to summary |
|---|---|
| public Object getValue() | |
| serialize | back to summary |
|---|---|
| public void serialize(JsonGenerator jgen, SerializerProvider provider) throws IOException Implements com. Doc from com. Serialization method called when no additional type information is to be included in serialization.
| |
| serializeWithType | back to summary |
|---|---|
| public void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException Implements com. Doc from com. Serialization method called when additional type information is expected to be included in serialization, for deserialization to use.
Usually implementation consists of a call to Note that some types (most notably, "natural" types: String, Integer, Double and Boolean) never include type information.
| |