JSON parser.

A

Asen Bozhilov

I implemented full JSON parser. The main goal was to create full JSON
parser according ECMA-262-5 JSON grammar.

<URL: https://github.com/abozhilov/json/blob/master/src/json.js>

I made it not for fallback implementation of `JSON.parse', I made it
for debugging and testing purposes of my JSON strings. If the JSON
string is not syntactical correct, the parser throws a SyntaxError
with line and column numbers of the error.

It covers all test cases from:
<URL: http://asenbozhilov.com/json-parse.html>

Also by suggestions from Scott Sauyet I added and optional `reviver'
parameter to `evalJSON'.

I am planning in the near future, to create front-end of this parser,
to provide test environment of JSON strings.

Any suggestions, improvements or critics are welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,077
Messages
2,570,566
Members
47,202
Latest member
misc.

Latest Threads

Top