File: README.md

package info (click to toggle)
yyjson 0.12.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,484 kB
  • sloc: ansic: 28,930; xml: 253; javascript: 99; sh: 13; cpp: 8; makefile: 8; objc: 7
file content (64 lines) | stat: -rw-r--r-- 2,088 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# JSON Test Data


## test_parsing
Source: <https://github.com/nst/JSONTestSuite>

A comprehensive test suite for RFC 8259 compliant JSON parsers.
The name of these files tell if their contents should be accepted or rejected.

- `y_` content must be accepted by parsers
- `n_` content must be rejected by parsers
- `i_` parsers are free to accept or reject content


## test_transform
Source: <https://github.com/nst/JSONTestSuite>

These files contain weird structures and characters that parsers may understand differently, eg:

- huge numbers
- dictionaries with similar keys
- NULL characters
- escaped invalid strings


## test_checker
Source: <http://www.json.org/JSON_checker/>

If the JSON_checker is working correctly, it must accept all of the pass\*.json files and reject all of the fail\*.json files. (fail01.json is excluded as it is relaxed in RFC7159. fail18.json is excluded as depth of JSON is not specified.)


## test_roundtrip
Source: <https://github.com/miloyip/nativejson-benchmark>

27 condensed JSONs are parsed and stringified. The results are compared to the original JSONs.

yyjson add more test case in this directory.

## test_encoding
Source: <https://github.com/miloyip/nativejson-benchmark>

Same JSON encoded as UTF-8/UTF-16/UTF-32 with or without BOM. 
RFC 8259 only accept UTF-8 without BOM.


## test_yyjson
JSON files used for yyjson testing.

- `(fail)` content must be rejected
- `(comma)` content has trailing comma
- `(comment)` content has comment
- `(endcomment)` content has comment at end
- `(inf)` content has infinity literal
- `(nan)` content has nan literal
- `(bignum)` content has large number (double overflow)
- `(bighex)` content has large hex number (u64/i64 overflow)
- `(garbage)` content has garbage after document
- `(str_err)` content has invalid unicode
- `(bom)` content has byte order mask (BOM)
- `(ext_num)` content has extended number format
- `(ext_esc)` content has extended escape sequence
- `(ext_ws)` content has extended whitespace
- `(str_sq)` content has single-quoted string
- `(str_uq)` content has unquoted key