Class AnsiJson

java.lang.Object
io.karatelabs.output.AnsiJson

public class AnsiJson extends Object
Fast ANSI colorizer for JSON text. Uses a simple state-machine scanner without full JSON parsing. Designed for console output of HTTP request/response bodies.
  • Method Details

    • colorize

      public static String colorize(String json)
      Colorize JSON text with ANSI codes. Returns the original text unchanged if colors are disabled.
      Parameters:
      json - the JSON text to colorize
      Returns:
      colorized JSON string