Class JsonParserUtil


  • public final class JsonParserUtil
    extends Object
    Utility class contains helper methods for json parse processing
    Version:
    2.0
    Author:
    Frank Giordano
    • Method Detail

      • parse

        public static org.json.simple.JSONObject parse​(String item)
                                                throws ZosmfRequestException
        This method is a wrapper for JSONParser().parse() call to parse z/OSMF response which may return ZosmfRequestException.
        Parameters:
        item - json string representation
        Returns:
        JSONObject object
        Throws:
        ZosmfRequestException - indicates the json item from z/OSMF request is invalid for parsing
      • parseArray

        public static org.json.simple.JSONArray parseArray​(String item)
                                                    throws ZosmfRequestException
        This method is a wrapper for JSONParser().parse() call to parse z/OSMF response which may return ZosmfRequestException.
        Parameters:
        item - json array representation
        Returns:
        JSONArray object
        Throws:
        ZosmfRequestException - indicates the json item from z/OSMF request is invalid for parsing