References Deprecated
StdScalarSerializer is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
java.lang.String s.
Since this is one of "native" types, no type information is ever included on serialization (unlike for most scalar types as of 1.5)
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType
Type of element (entity like property) being visited typeHint)Overrides com. Implements com. Default implementation specifies no format. |
| public JsonNode | getSchema(SerializerProvider
The serializer provider. provider, Type A hint about the type. typeHint)Overrides com. Implements com.
Deprecated
Since 2.15
Default implementation simply claims type is "string"; usually overriden by custom serializers. |
| public boolean | isEmpty(SerializerProvider prov, Object value)
Overrides com. Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values). |
| public void | serialize(Object
Value to serialize; can not be null. value, JsonGenerator Generator used to output resulting Json content gen, SerializerProvider Provider that can be used to get serializers for
serializing Objects value contains, if any. provider)Implements abstract com. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| public final void | serializeWithType(Object
Value to serialize; can not be null. value, JsonGenerator Generator used to output resulting Json content gen, SerializerProvider Provider that can be used to get serializers for
serializing Objects value contains, if any. provider, TypeSerializer Type serializer to use for including type information typeSer)Overrides com. Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| StringSerializer | back to summary |
|---|---|
| public StringSerializer() | |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) throws JsonMappingException Overrides com. Implements com. Doc from com. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| getSchema | back to summary |
|---|---|
| public JsonNode getSchema(SerializerProvider provider, Type typeHint) Overrides com. Implements com. Doc from com. Deprecated Since 2.15 Default implementation simply claims type is "string"; usually overriden by custom serializers.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty(SerializerProvider prov, Object value) Overrides com. Doc from com. Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values). Default implementation will consider only null values to be empty. Note replaces
| |
| serialize | back to summary |
|---|---|
| public void serialize(Object value, JsonGenerator gen, SerializerProvider provider) throws IOException Implements abstract com. Doc from com. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeWithType | back to summary |
|---|---|
| public final void serializeWithType(Object value, JsonGenerator gen, SerializerProvider provider, TypeSerializer typeSer) throws IOException Overrides com. Doc from com. Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix. This should work for most cases; some sub-classes may want to change this behavior.
| |