Class JsonPrettyPrinter

java.lang.Object
org.mockserver.serialization.JsonPrettyPrinter

public class JsonPrettyPrinter extends Object
Pretty-prints an already-parsed JsonNode tree to a JSON string.

Replaces the single com.github.fge.jackson.JacksonUtils.prettyPrint(JsonNode) call site that was the only use of the com.github.fge (json-tools) library on a code path reachable from the Java client. That library was pulled in transitively by the Swagger/OpenAPI parser; removing this dependency lets mockserver-client-java exclude the parser entirely. The output matches the previous behaviour: a two-space, line-feed indented document with BigDecimal values written in plain (non-scientific) form. The result is only logged and re-parsed, so exact whitespace is not contractual.

Author:
jamesdbloom
  • Constructor Details

    • JsonPrettyPrinter

      public JsonPrettyPrinter()
  • Method Details

    • prettyPrint

      public static String prettyPrint(com.fasterxml.jackson.databind.JsonNode node)