Class JsonUtils


  • public class JsonUtils
    extends Object
    Author:
    pthomas3
    • Method Detail

      • isJson

        public static boolean isJson​(String s)
      • toStrictJson

        public static String toStrictJson​(String raw)
      • toJson

        public static String toJson​(Object o,
                                    boolean pretty)
      • toJsonBytes

        public static byte[] toJsonBytes​(Object o)
      • fromJsonStrict

        public static Object fromJsonStrict​(String json)
      • fromJson

        public static <T> T fromJson​(String s,
                                     Class<T> clazz)
      • toJsonSafe

        public static String toJsonSafe​(Object o,
                                        boolean pretty)
      • escapeValue

        public static String escapeValue​(String raw)
      • removeKeysWithNullValues

        public static void removeKeysWithNullValues​(Object o)