Package manifold.json.rt.api
Interface IJsonParser
-
- All Known Implementing Classes:
DefaultParser
public interface IJsonParser
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static IJsonParsergetDefaultParser()ObjectparseJson(String jsonText, boolean withBigNumbers, boolean withTokens)Parse Json text as a standard manifold.rt.api.Bindings object.
-
-
-
Method Detail
-
parseJson
Object parseJson(String jsonText, boolean withBigNumbers, boolean withTokens) throws manifold.rt.api.ScriptException
Parse Json text as a standard manifold.rt.api.Bindings object.- Parameters:
jsonText- Any Json text, can be an object, a list, or simple value.withBigNumbers- Parse decimal numbers as BigDecimals and integers and BigIntegers, otherwise they are Double and Integer.withTokens- Store tokens for Json name value pairs. The token contains positional information for tooling e.g., to facilitate navigation in an IDE. This parameter should be false for normal use-cases.- Returns:
- A JSON value (primitive/boxed type, String, List of JSON values, or Bindings of String/JSON value)
- Throws:
manifold.rt.api.ScriptException- for parse errors
-
getDefaultParser
static IJsonParser getDefaultParser()
-
-