Class ChartFunctionSerializer

java.lang.Object
tools.jackson.databind.ValueSerializer<ChartFunction>
com.vaadin.flow.component.charts.model.serializers.ChartFunctionSerializer
All Implemented Interfaces:
tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

public class ChartFunctionSerializer extends tools.jackson.databind.ValueSerializer<ChartFunction>
Serializer for ChartFunction values. A function is not part of the chart JSON: it is sent to the browser as an argument of its own, together with the path of the option it belongs to.

When the serialization has a ChartFunctionSerializer.Collector as an attribute, the function is added to it and a placeholder is written, which ChartFunctionSerializer.Collector.extract(JsonNode, boolean) removes again. Without a collector, the option is left out: the function counts as empty, and ChartSerialization includes properties of type ChartFunction only when they are not empty.

For internal use only. May be renamed or removed in a future release.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Collects the functions of one serialization, and finds where they are in the resulting JSON.

    Nested classes/interfaces inherited from class tools.jackson.databind.ValueSerializer

    tools.jackson.databind.ValueSerializer.None
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static tools.jackson.databind.JacksonModule
     
    boolean
    isEmpty(tools.jackson.databind.SerializationContext context, ChartFunction value)
     
    void
    serialize(ChartFunction value, tools.jackson.core.JsonGenerator gen, tools.jackson.databind.SerializationContext context)
     

    Methods inherited from class tools.jackson.databind.ValueSerializer

    acceptJsonFormatVisitor, createContextual, getDelegatee, handledType, isUnwrappingSerializer, properties, replaceDelegatee, resolve, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withFormatOverrides, withIgnoredProperties

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ChartFunctionSerializer

      public ChartFunctionSerializer()
  • Method Details

    • getModule

      public static tools.jackson.databind.JacksonModule getModule()
    • serialize

      public void serialize(ChartFunction value, tools.jackson.core.JsonGenerator gen, tools.jackson.databind.SerializationContext context)
      Specified by:
      serialize in class tools.jackson.databind.ValueSerializer<ChartFunction>
    • isEmpty

      public boolean isEmpty(tools.jackson.databind.SerializationContext context, ChartFunction value)
      Overrides:
      isEmpty in class tools.jackson.databind.ValueSerializer<ChartFunction>