Class FloatSerializer

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

public class FloatSerializer extends com.fasterxml.jackson.databind.ser.std.StdSerializer<Float>
A custom serializer for Float values, extending StdSerializer. This serializer handles special floating-point values, converting them into 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(Float value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)
    Serializes a Float 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

    • FloatSerializer

      public FloatSerializer()
      Default constructor. Initializes the serializer for Float type.
  • Method Details

    • serialize

      public void serialize(Float value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Serializes a Float 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<Float>
      Parameters:
      value - the Float 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.