nst/JSONTestSuite
关于
用于测试符合 RFC 8259 的 JSON 解析器的完整测试套件。
开发工具实测星标增长
- 24小时
- 0
- 7天
- +2
- 15天
- +4
- 1个月
- +6
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文JSON Parsing Test Suite
A comprehensive test suite for RFC 8259 compliant JSON parsers
This repository was created as an appendix to the article Parsing JSON is a Minefield 💣.
/parsers/
This directory contains several parsers and tiny wrappers to turn the parsers into JSON validators, by returning a specific value.
0the parser did accept the content1the parser did reject the content>1the process did crashtimeouthappens after 5 seconds
/test_parsing/
The name of these files tell if their contents should be accepted or rejected.
y_content must be accepted by parsersn_content must be rejected by parsersi_parsers are free to accept or reject content
/test_transform/
These files contain weird structures and characters that parsers may understand differently, eg:
- huge numbers
- dictionaries with similar keys
- NULL characters
- escaped invalid strings
These files were used to produce results/transform.html.
/run_tests.py
Run all parsers with all files:
$ python3 run_tests.py
Run all parsers with a specific file:
$ python3 run_tests.py file.json
Run specific parsers with all files:
$ echo '["Python 2.7.10", "Python 3.5.2"]' > python_only.json
$ python3 run_tests.py --filter=python_only.json
The script writes logs in results/logs.txt.
The script then reads logs.txt and generates results/parsing.html.
/results/
探索相关项目
加载中…