Fixes for ocaml-json syntax bugs
Brought to you by:
didosevilla
This patch makes the following changes to ocaml-json's lexer source. Most changes are related to parsing bugs in the original implementation.
- empty arrays and objects no longer rejected
- unnecessary trailing commas no longer required
- ability to scan escaped quote and backslash characters in strings
- proper escaping of quote characters in output strings
- more robust handling of floats, avoiding false matches in lexer
- no trailing commas in object and array literal output
- raises Eof exception on unexpected EOF tokens
Unified diff to json.mll