Class NashornJSONParser

java.lang.Object
com.oracle.truffle.js.builtins.json.NashornJSONParser

public class NashornJSONParser extends Object
Parses JSON text and returns the corresponding JS object representation. Derived from the ObjectLiteral production of the main parser. See: 15.12.1.2 The JSON Syntactic Grammar
  • Constructor Details

    • NashornJSONParser

      public NashornJSONParser(com.oracle.truffle.api.strings.TruffleString source, JSContext context)
      Constructor.
      Parameters:
      source - the source
      context - the global object
  • Method Details

    • parse

      public Object parse()
      Public parse method. Parse a string into a JSON object.
      Returns:
      the parsed JSON Object