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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    True when re-reading the plain-string form would not reproduce this value, negation and optionality.
    void
    serialize(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, wrapAndThrow

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

    getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      serialize in class com.fasterxml.jackson.databind.ser.std.StdSerializer<NottableString>
      Throws:
      IOException
    • isAmbiguousAsPlainString

      public static boolean isAmbiguousAsPlainString(NottableString nottableString)
      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 KeysToMultiValuesSerializer uses this to decide when the whole collection must fall back to the array form.