TokenBuffer;
and since it is part of core package, it cannot implement
tools.jackson.databind.JacksonSerializable
(which is only included in the mapper package)
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)
Overrides tools. Implements tools. Default implementation specifies no format. |
| public void | serialize(TokenBuffer value, JsonGenerator jgen, SerializationContext provider)
Implements abstract tools. Method that can be called to ask implementation to serialize values of type this serializer handles. |
| public final void | serializeWithType(TokenBuffer value, JsonGenerator g, SerializationContext ctxt, TypeSerializer typeSer)
Overrides tools. Implementing typed output for contents of a TokenBuffer is very tricky, since we do not know for sure what its contents might look like (or, rather, we do know when serializing, but not necessarily when deserializing!) One possibility would be to check the current token, and use that to determine if we would output JSON Array, Object or scalar value. |
| TokenBufferSerializer | back to summary |
|---|---|
| public TokenBufferSerializer() | |
| acceptJsonFormatVisitor | back to summary |
|---|---|
| public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) Overrides tools. Implements tools. Doc from tools. Default implementation specifies no format. This behavior is usually overriden by custom serializers.
| |
| serialize | back to summary |
|---|---|
| public void serialize(TokenBuffer value, JsonGenerator jgen, SerializationContext provider) throws JacksonException Implements abstract tools. Doc from tools. Method that can be called to ask implementation to serialize values of type this serializer handles.
| |
| serializeWithType | back to summary |
|---|---|
| public final void serializeWithType(TokenBuffer value, JsonGenerator g, SerializationContext ctxt, TypeSerializer typeSer) throws JacksonException Overrides tools. Implementing typed output for contents of a TokenBuffer is very tricky, since we do not know for sure what its contents might look like (or, rather, we do know when serializing, but not necessarily when deserializing!) One possibility would be to check the current token, and use that to determine if we would output JSON Array, Object or scalar value. Note that we just claim it is scalar; this should work ok and is simpler than doing introspection on both serialization and deserialization.
| |