benejson.js
Javascript JSON parsing library, part of
benejson
Dependencies
None
Install
Just copy benejson.js to where you need it.
License
MIT/X License
Authors
David Bender (codehero@gmail.com)
Contact
David Bender (codehero@gmail.com)
Mailing List (benejson@librelist.com)
Goals
- Support incremental JSON parsing
- Support out of spec values Infinity and NaN
- Provide clean syntax to organize parsing contexts and functions
- Support building parser modularly (parser pieces can be assembled from different files, etc)
- ZERO use of eval()
Design
- Library is implemented in two parts:
- Tokenizer (JSONTokenizer)
- Zero use of eval
- Use divide and conquer strategy to parse
- Emit parse events
- Parser (JSONParser)
- Provide easy and modular way for user to specify parsing behaviour
- Process parse events from Tokenizer
- Map parse events to user specification
Usage
Please see the wiki for usage details.
Project Ideas
- Create library to incrementally parse CouchDB responses (especially views)
- Create wrapper around benejson.c as a more performant tokenizer
Issues
- Functional, but unpolished.
- Does not support \u escape characters yet.
- Does not strictly verify syntax yet.
Download
Please go to the Downloads page for the latest tagged release.
You can also clone the project with Git
by running:
$ git clone git://github.com/codehero/benejson