Class DoubleSerializer

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<Double>
com.fasterxml.jackson.databind.ser.std.StdSerializer<Double>
com.datastax.astra.internal.serdes.tables.DoubleSerializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, Serializable

public class DoubleSerializer extends com.fasterxml.jackson.databind.ser.std.StdSerializer<Double>
A custom serializer for Double values, extending StdSerializer. This serializer handles special cases of floating-point numbers, converting them to their textual representations in JSON.

Special handling is provided for:

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
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    serialize(Double value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)
    Serializes a Double value into JSON.

    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

    • DoubleSerializer

      public DoubleSerializer()
      Default constructor. Initializes the serializer for Double type.
  • Method Details

    • serialize

      public void serialize(Double value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Serializes a Double value into JSON.

      Converts special floating-point values into their respective textual representations:

      Specified by:
      serialize in class com.fasterxml.jackson.databind.ser.std.StdSerializer<Double>
      Parameters:
      value - the Double value to serialize.
      gen - the JsonGenerator used to write JSON content.
      provider - the SerializerProvider for accessing serialization configuration.
      Throws:
      IOException - if an I/O error occurs during serialization.