Class JsonUtils


  • public final class JsonUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String prettyPrint​(java.lang.String unformattedJsonString)
      Based on https://stackoverflow.com/a/49564514/510017
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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.