Class NashornJSONParser
java.lang.Object
com.oracle.truffle.js.builtins.json.NashornJSONParser
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 Summary
ConstructorsConstructorDescriptionNashornJSONParser(com.oracle.truffle.api.strings.TruffleString source, JSContext context) Constructor. -
Method Summary
-
Constructor Details
-
NashornJSONParser
Constructor.- Parameters:
source- the sourcecontext- the global object
-
-
Method Details
-
parse
Public parse method. Parse a string into a JSON object.- Returns:
- the parsed JSON Object
-