Class JsonProcessor
- java.lang.Object
-
- org.apache.synapse.commons.json.jsonprocessor.parser.JsonProcessor
-
public class JsonProcessor extends Object
This class will parse a given JSON input according to a given schema. Supported inout formats - String and Gson JsonObject
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
parseJson(String inputString, String inputSchema)
This method parse a given JSON string according to the given schema.
-
-
-
Method Detail
-
parseJson
public static String parseJson(String inputString, String inputSchema) throws ValidatorException, ParserException
This method parse a given JSON string according to the given schema. Both as string.- Parameters:
inputString
- input String.inputSchema
- input Schema.- Returns:
- corrected String.
- Throws:
ValidatorException
- Exception occurs in validation process.ParserException
- Exception occurs in data type parsing.
-
-