Class ValueJsonSerializer<T>

java.lang.Object
jodd.json.impl.ValueJsonSerializer<T>
All Implemented Interfaces:
TypeJsonSerializer<T>
Direct Known Subclasses:
ArraysJsonSerializer, EmptyJsonSerializer, IterableJsonSerializer, KeyValueJsonSerializer, ObjectJsonSerializer

public abstract class ValueJsonSerializer<T> extends Object implements TypeJsonSerializer<T>
Base class for all JSON objects and arrays serializers. Detects circular dependencies and pushes value to current type context of provided json context.
  • Constructor Details

    • ValueJsonSerializer

      public ValueJsonSerializer()
  • Method Details

    • serialize

      public final boolean serialize(JsonContext jsonContext, T value)
      Detects circular dependencies and pushes value as current type context.
      Specified by:
      serialize in interface TypeJsonSerializer<T>
    • serializeValue

      public abstract void serializeValue(JsonContext jsonContext, T value)
      Performs the serialization of the value.