public interface Serializer<T>
Serializes a message to a single line of JSON.
-
Method Summary
Modifier and TypeMethodDescriptionvoidwriteValue(Writer writer, T value) Serialize an object to single line of JSON and write it to the givenwriter.
-
Method Details
-
writeValue
Serialize an object to single line of JSON and write it to the givenwriter.- Values must be included unless their value is
nullor an "absent" reference values such as empty optionals. - Enums must be written as strings.
- Implementations may not close the
writerafter writing avalue.
- Parameters:
writer- to write tovalue- to serialize
- Values must be included unless their value is
-