Interface Serializer<T>

Type Parameters:
T - The type to adapt.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Serializer<T>
A functional interface for providing a custom serialization strategy for a specific class. This is useful for types that the default reflection-based serializer cannot handle correctly.
  • Method Summary

    Modifier and Type
    Method
    Description
    serialize(T value)
    Converts a given value of type T into a NestedText-compatible object.
  • Method Details

    • serialize

      Object serialize(T value)
      Converts a given value of type T into a NestedText-compatible object. The returned object should be a String, Map, or Collection.
      Parameters:
      value - The object to convert.
      Returns:
      The NestedText-compatible representation of the value.