Class JsonUtil

java.lang.Object
com.kazurayam.materialstore.util.JsonUtil

public final class JsonUtil extends Object
  • Field Details

    • LINE_COLUMN_PATTERN

      public static final Pattern LINE_COLUMN_PATTERN
      Given with an Exception: Caused by: com.google.gson.stream.MalformedJsonException: Expected ':' at line 1 column 8 path $..8 log the following: line ---------1---------2--- ... --9---------0---------1--- ... 1 { "foo", "bar" } ^
  • Method Details

    • escapeAsJsonString

      public static String escapeAsJsonString(String value)
    • prettyPrint

      public static String prettyPrint(String sourceJson)
    • prettyPrint

      public static <T> String prettyPrint(String sourceJson, Class<T> clazz)
    • logJsonSyntaxException

      public static void logJsonSyntaxException(String json, com.google.gson.JsonSyntaxException e, org.slf4j.Logger logger) throws IOException
      Throws:
      IOException