Class ObjectEncoder

java.lang.Object
dev.toonformat.jtoon.encoder.ObjectEncoder

public final class ObjectEncoder extends Object
Handles encoding of JSON objects to TOON format. Recursively encodes nested objects and delegates arrays to ArrayEncoder.
  • Method Details

    • encodeObject

      public static void encodeObject(tools.jackson.databind.node.ObjectNode value, LineWriter writer, int depth, EncodeOptions options)
      Encodes an ObjectNode to TOON format.
      Parameters:
      value - The ObjectNode to encode
      writer - LineWriter for accumulating output
      depth - Current indentation depth
      options - Encoding options
    • encodeKeyValuePair

      public static void encodeKeyValuePair(String key, tools.jackson.databind.JsonNode value, LineWriter writer, int depth, EncodeOptions options)
      Encodes a key-value pair in an object.
      Parameters:
      key - the key name
      value - the value to encode
      writer - the LineWriter for accumulating output
      depth - the current indentation depth
      options - encoding options