Class ListItemEncoder
java.lang.Object
dev.toonformat.jtoon.encoder.ListItemEncoder
Handles encoding of objects as list items in non-uniform arrays.
Implements the complex logic for placing the first field on the "- " line
and indenting remaining fields.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidencodeObjectAsListItem(tools.jackson.databind.node.ObjectNode obj, LineWriter writer, int depth, EncodeOptions options) Encodes an object as a list item.
-
Method Details
-
encodeObjectAsListItem
public static void encodeObjectAsListItem(tools.jackson.databind.node.ObjectNode obj, LineWriter writer, int depth, EncodeOptions options) Encodes an object as a list item. First key-value appears on the "- " line, remaining fields are indented.- Parameters:
obj- The object to encodewriter- LineWriter for outputdepth- Indentation depthoptions- Encoding options
-