Skip to content

Improve conformance of the JSON tokenizer and parser

Emmanuele Bassi requested to merge ebassi/scanner-cleanup into master

The GScanner "fork" that tokenizes JSON is far too complex because it is meant to be generic. That complexity and generality prevent proper conformance to the JSON grammar—outside of things we consciously decided to support, like empty streams and comments.

Reducing the flexibility and complexity of JsonScanner allows JSON-GLib to improve its conformance to the JSON grammar, to the point that we can now run a conformance test suite without too many exceptions.

The conformance test suite is the MIT licensed JSON Parsing Test Suite by Nicolas Seriot, and it is included in the source tree.

Edited by Emmanuele Bassi

Merge request reports