Class HeaderFormatter

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

public final class HeaderFormatter extends Object
Formats headers for arrays and tables in TOON format.
  • Method Details

    • format

      public static String format(HeaderFormatter.HeaderConfig config)
      Formats a header for arrays and tables.
      Parameters:
      config - Header configuration
      Returns:
      Formatted header string
    • format

      public static String format(int length, String key, List<String> fields, String delimiter, boolean lengthMarker)
      Legacy method for backward compatibility. Delegates to the record-based format method.
      Parameters:
      length - the array or table length
      key - optional key prefix
      fields - optional field names for tabular format
      delimiter - the delimiter being used
      lengthMarker - whether to include # marker before length
      Returns:
      formatted header string