Class JsonStringFormatter

java.lang.Object
ch.psi.wica.infrastructure.util.JsonStringFormatter

@Immutable public class JsonStringFormatter extends Object
Provides a utility class for nicely formatting a JSON string.
  • Constructor Details

    • JsonStringFormatter

      public JsonStringFormatter()
  • Method Details

    • prettyFormat

      public static String prettyFormat(String jsonInput) throws RuntimeException
      Formats the supplied input string in a pretty way.
      Parameters:
      jsonInput - the input string.
      Returns:
      the formatted result
      Throws:
      RuntimeException - if something goes wrong.