Class CustomJsonSerializer

java.lang.Object
name.martingeisse.grumpyjson.serialize.CustomJsonSerializer

public final class CustomJsonSerializer extends Object
Helper methods to build custom serializers for common cases.
  • Method Details

    • from

      public static <T> JsonSerializer<T> from(Class<T> clazz, CustomJsonSerializer.SerializerBody<T> body)
      Builds a serializer for a single class type from a code body.
      Type Parameters:
      T - the type to serialize
      Parameters:
      clazz - the type to serialize
      body - the code body
      Returns:
      the serializer