Class JsonSupport


  • public final class JsonSupport
    extends Object
    • Method Detail

      • parseObject

        public static javax.json.JsonObject parseObject​(String jsonString)
        Parse String to JSON object.
        Parameters:
        jsonString - JSON string
        Returns:
        JSON object
      • parseArray

        public static javax.json.JsonArray parseArray​(String jsonString)
        Parse String to JSON array.
        Parameters:
        jsonString - JSON string
        Returns:
        JSON array
      • validateJsonStructure

        public static void validateJsonStructure​(String jsonString,
                                                 boolean tickToDoubleQuote)
        Validate JSON structure
        Parameters:
        jsonString - JSON string
        tickToDoubleQuote - Tick to double quote
        Throws:
        javax.json.JsonException - when JSON structure is invalid
      • toJson

        public static javax.json.JsonObject toJson​(Map<String,​Object> map)