My goal was to write JSON validator which:
- Fully conforms to RFC8259.
- Passes all tests from http://www.json.org/JSON_checker/ .
- Passes all tests from https://github.com/nst/JSONTestSuite .
- If used with the strictest set of options fails all tests started with
i_
(these are JSON files which does not strictly conform to standard but can be accepted). - Passes all tests from (4) if used with the most tolerant set of options.
- Learn Zig along the way.
Non-goals:
- Replace parser from standard library.
- Implement streaming parser.
So far each goal has been achieved, with 2 exceptions (I have no plans to fix this):
- In (5) tests containing BOM are failed. Working with strings in Zig is not pleasant, so I skipped it.
- In (2) some tests are skipped, because RFC8259 allows a bit more than previous RFC7159 .
- There some changes in Errata of RFC8250 which could be taken into account.
This also needs some more testing.