mirror of
https://github.com/fangyidong/json-simple.git
synced 2025-12-06 15:30:54 +03:00
1.7 KiB
1.7 KiB
Introduction
JSON.simple uses json-test-suite to do compliance testing. Please follow The mapping between JSON and Java to get the result compliant to JSON spec. Please note that interface JSONAware and JSONStreamAware is to provide the flexibility and freedom to the user so that he can render the result in any way and make any extensions (such as comments that are not supported by JSON spec), so the user should know what he's doing when he implements these interfaces.
Steps
- Download the latest json-test-suite package from the home page of json-test-suite
- Unzip and run the following command in the directory of the package:
ant -f test.xml compliance
- You may need to wait for a few minutes and then check the results from the following files:
TEST-org.json.simple.compliance.EncoderTest.txt
TEST-org.json.simple.compliance.DecoderTest.txt
Results
Both of the encoder and decoder have passed tens of thousands randomly generated samples. No errors found so far. In real world applications, JSON.simple has been used in quite a few projects in the past years.
| Module | Result |
|---|---|
| Encoder | 100,000+ samples passed, no errors found. |
| Streaming Encoder | 100,000+ samples passed, no errors found. |
| Decoder | 100,000+ samples passed, no errors found. |
| Decoder with SAX-like content handler | 100,000+ samples passed, no errors found. |
How does it work?
TBD