Package org.webpki.json
Class JSONParser
java.lang.Object
org.webpki.json.JSONParser
Parses JSON string/byte array data.
-
Method Summary
Modifier and TypeMethodDescriptionstatic JSONObjectReader
parse
(byte[] jsonBytes) Parse JSON byte array data.static JSONObjectReader
Parse JSON string data.static void
setStrictNumericMode
(boolean strict) Define strictness of "Number" parsing.
-
Method Details
-
parse
Parse JSON string data.- Parameters:
jsonString
- The data to be parsed in UTF-8- Returns:
- JSONObjectReader
-
parse
Parse JSON byte array data.- Parameters:
jsonBytes
- The data to be parsed in UTF-8- Returns:
- JSONObjectReader
-
setStrictNumericMode
public static void setStrictNumericMode(boolean strict) Define strictness of "Number" parsing. In strict mode 1.50 and 1e+3 would fail since they are not normalized. Default mode is not strict.- Parameters:
strict
- True if strict mode is requested
-