Class DefaultParser

    • Constructor Detail

      • DefaultParser

        public DefaultParser()
    • Method Detail

      • parseJson

        public Object parseJson​(String jsonText,
                                boolean withBigNumbers,
                                boolean withTokens)
                         throws manifold.rt.api.ScriptException
        Description copied from interface: IJsonParser
        Parse Json text as a standard manifold.rt.api.Bindings object.
        Specified by:
        parseJson in interface IJsonParser
        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