README.md - json-testsuite - JSON test-suite | |
git clone git://git.codemadness.org/json-testsuite | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
README.md (1542B) | |
--- | |
1 # JSON Parsing Test Suite | |
2 A comprehensive test suite for RFC 8259 compliant JSON parsers | |
3 | |
4 This repository was created as an appendix to the article [Parsing JSON … | |
5 | |
6 **/parsers/** | |
7 | |
8 This directory contains several parsers and tiny wrappers to turn the pa… | |
9 | |
10 - `0` the parser did accept the content | |
11 - `1` the parser did reject the content | |
12 - `>1` the process did crash | |
13 - `timeout` happens after 5 seconds | |
14 | |
15 **/test\_parsing/** | |
16 | |
17 The name of these files tell if their contents should be accepted or rej… | |
18 | |
19 - `y_` content must be accepted by parsers | |
20 - `n_` content must be rejected by parsers | |
21 - `i_` parsers are free to accept or reject content | |
22 | |
23 **/test\_transform/** | |
24 | |
25 These files contain weird structures and characters that parsers may und… | |
26 | |
27 - huge numbers | |
28 - dictionaries with similar keys | |
29 - NULL characters | |
30 - escaped invalid strings | |
31 | |
32 These files were used to produce `results/transform.html`. | |
33 | |
34 **/run_tests.py** | |
35 | |
36 Run all parsers with all files: | |
37 | |
38 $ python3 run_tests.py | |
39 | |
40 Run all parsers with a specific file: | |
41 | |
42 $ python3 run_tests.py file.json | |
43 | |
44 Run specific parsers with all files: | |
45 | |
46 $ echo '["Python 2.7.10", "Python 3.5.2"]' > python_only.json | |
47 $ python3 run_tests.py --filter=python_only.json | |
48 | |
49 The script writes logs in `results/logs.txt`. | |
50 | |
51 The script then reads `logs.txt` and generates `results/parsing.html`. | |
52 | |
53 **/results/** | |
54 | |
55 <img src="results/pruned_results.png" alt="JSON Parsing Tests" /> |