Class JsonUtils
java.lang.Object
io.micrometer.core.instrument.util.JsonUtils
public final class JsonUtils
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description static java.lang.String
prettyPrint(java.lang.String unformattedJsonString)
Based on https://stackoverflow.com/a/49564514/510017Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
prettyPrint
public static java.lang.String prettyPrint(java.lang.String unformattedJsonString)Based on https://stackoverflow.com/a/49564514/510017- Parameters:
unformattedJsonString
- JSON string that has not been formatted at all.- Returns:
- A best-effort at pretty printed JSON, even for malformed JSON.
-