Class NottableStringSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
com.fasterxml.jackson.databind.ser.std.StdSerializer<NottableString>
org.mockserver.serialization.serializers.string.NottableStringSerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable,com.fasterxml.jackson.databind.jsonschema.SchemaAware,Serializable
public class NottableStringSerializer
extends com.fasterxml.jackson.databind.ser.std.StdSerializer<NottableString>
- Author:
- jamesdbloom
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None -
Field Summary
Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAmbiguousAsPlainString(NottableString nottableString) True when re-reading the plain-string form would not reproduce this value, negation and optionality.voidserialize(NottableString nottableString, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrowMethods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
-
Constructor Details
-
NottableStringSerializer
public NottableStringSerializer()
-
-
Method Details
-
serialize
public void serialize(NottableString nottableString, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException - Specified by:
serializein classcom.fasterxml.jackson.databind.ser.std.StdSerializer<NottableString>- Throws:
IOException
-
isAmbiguousAsPlainString
True when re-reading the plain-string form would not reproduce this value, negation and optionality. Determined by actually re-parsing rather than by enumerating prefixes, so it stays correct for compound markers ("?!", "!?") and any future marker character.Public because the same question has to be asked of collection KEYS: a header, query parameter or cookie NAME goes on the wire as a JSON field name, which has no object form, so
KeysToMultiValuesSerializeruses this to decide when the whole collection must fall back to the array form.
-