Class JsonUtil


  • public final class JsonUtil
    extends java.lang.Object
    A utility class
    Since:
    1.1
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JsonUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static JsonValue toJson​(java.lang.String jsonString)
      Reads the input JSON text and returns a JsonValue.
      • Methods inherited from class java.lang.Object

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

      • JsonUtil

        private JsonUtil()
    • Method Detail

      • toJson

        public static JsonValue toJson​(java.lang.String jsonString)
        Reads the input JSON text and returns a JsonValue.

        For convenience, single quotes as well as double quotes are allowed to delimit JSON strings. If single quotes are used, any quotes, single or double, in the JSON string must be escaped (prepend with a '\').

        Parameters:
        jsonString - the input JSON data
        Returns:
        the object model for jsonString
        Throws:
        JsonParsingException - if the input is not legal JSON text