Skip to content

Commit

Permalink
Merge pull request #69 from TysonAndre/test_parsing
Browse files Browse the repository at this point in the history
Add script to compare results against json_decode()
  • Loading branch information
crazyxman authored Oct 1, 2022
2 parents 2cb3982 + ad6347a commit 91cae36
Show file tree
Hide file tree
Showing 321 changed files with 1,304 additions and 197 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[123.456e-789]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_number_huge_exp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0.4e00669999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999969999999006]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_number_neg_int_huge_exp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-1e+9999]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1.5e+9999]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_number_real_neg_overflow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-123123e100000]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_number_real_pos_overflow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[123123e100000]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_number_real_underflow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[123e-10000000]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_number_too_big_neg_int.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-123123123123123123123123123123]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_number_too_big_pos_int.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[100000000000000000000]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-237462374673276894279832749832423479823246327846]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"\uDFAA":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\uDADA"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\uD888\u1234"]
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["日ш�"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["���"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\uD800\n"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\uDd1ea"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\uD800\uD800\n"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\ud800"]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_string_invalid_surrogate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\ud800abc"]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_string_invalid_utf-8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[""]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\uDd1e\uD834"]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_string_iso_latin_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[""]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["\uDFAA"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[""]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["����"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["��"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["������"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["������"]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/i_string_truncated-utf-8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["��"]
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1 true]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_a_invalid_utf8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[a�]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["": 1]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_comma_after_close.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[""],
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_comma_and_number.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[,1]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_double_comma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1,,2]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_double_extra_comma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["x",,]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_extra_close.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["x"]]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_extra_comma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["",]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_incomplete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["x"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[x
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[3[4]]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_invalid_utf8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1:2]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_just_comma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[,]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_just_minus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_missing_value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[ , ""]
3 changes: 3 additions & 0 deletions jsonexamples/test_parsing/n_array_newlines_unclosed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
["a",
4
,1,
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_number_and_comma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1,]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1,,]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[" a"\f]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_star_inside.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[*]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_array_unclosed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1,
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[1,
1
,1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_incomplete_false.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[fals]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_incomplete_null.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[nul]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_incomplete_true.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[tru]
Binary file not shown.
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_++.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[++1234]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_+1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[+1]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_+Inf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[+Inf]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_-01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-01]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_-1.0..json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-1.0.]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_-2..json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-2.]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_-NaN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-NaN]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_.-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[.-1]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_.2e-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[.2e-3]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_0.1.2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0.1.2]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_0.3e+.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0.3e+]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_0.3e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0.3e]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_0.e1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0.e1]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_0_capital_E+.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0E+]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_0_capital_E.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0E]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_0e+.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0e+]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_0e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0e]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_1.0e+.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1.0e+]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_1.0e-.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1.0e-]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_1.0e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1.0e]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_1_000.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1 000.0]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_1eE2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1eE2]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_2.e+3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[2.e+3]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_2.e-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[2.e-3]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_2.e3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[2.e3]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_9.e+.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[9.e+]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_Inf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Inf]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_NaN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[NaN]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_expression.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1+2]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_hex_1_digit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0x1]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_hex_2_digits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0x42]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_infinity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Infinity]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_invalid+-.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0e+-1]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-123.123foo]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[123�]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1e1�]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0�]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_minus_infinity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-Infinity]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-foo]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_minus_space_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[- 1]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-012]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-.123]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[-1x]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1ea]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1e�]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1.]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_starting_with_dot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[.123]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_with_alpha.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1.2a-3]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_with_alpha_char.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1.8011670033376514H-308]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_number_with_leading_zero.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[012]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_bad_value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["x", truth]
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_bracket_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{[: "x"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"x", null}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_double_colon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"x"::"b"}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_emoji.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{🇨🇭}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_garbage_at_end.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a":"a" 123}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{key: 'value'}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"�":"0",}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_missing_colon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a" b}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_missing_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{:"b"}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_missing_semicolon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a" "b"}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_missing_value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a":
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_no-colon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a"
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_non_string_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{1:1}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{9999E9999:1}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_repeated_null_null.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{null:null,null:null}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":0,,,,,}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_single_quote.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{'a':0}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_trailing_comma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":0,}
1 change: 1 addition & 0 deletions jsonexamples/test_parsing/n_object_trailing_comment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"a":"b"}/**/
Loading

0 comments on commit 91cae36

Please sign in to comment.