Class CustomJsonSerializer
java.lang.Object
name.martingeisse.grumpyjson.serialize.CustomJsonSerializer
Helper methods to build custom serializers for common cases.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe body of a custom serializer -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> JsonSerializer<T>from(Class<T> clazz, CustomJsonSerializer.SerializerBody<T> body) Builds a serializer for a single class type from a code body.
-
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 serializebody- the code body- Returns:
- the serializer
-