ref: 073eb256baff4d87a723518f80ac758db4e0a551
parent: fb01f695fa5bfde9246492452cf65698e35c0b73
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Dec 23 20:44:20 EST 2016
Comply with json spec. At least a little.
--- a/lib/json/j.myr
+++ b/lib/json/j.myr
@@ -10,7 +10,8 @@
| `std.Ok j:
std.put("{}\n", j)
json.free(j)
- | `std.Err e: std.put("{}\n", e)
+ | `std.Err e:
+ std.put("{}\n", e)
;;
std.slfree(data)
;;
--- a/lib/json/parse.myr
+++ b/lib/json/parse.myr
@@ -26,7 +26,6 @@
match parseelt(&parser)
| `std.Ok j:
takespace(&parser)
- std.put("parser: {}\n", parser)
if parser.idx != parser.str.len
free(j)
-> `std.Err [
@@ -74,7 +73,7 @@
-> `std.Ok std.mk(`Null)
elif std.isdigit(peekc(p)) || peekc(p) == '-'
match parsenum(p)
- | `std.Some n: -> `std.Ok std.mk(`Num (n : flt64))
+ | `std.Some n: -> `std.Ok std.mk(`Num n)
| `std.None: -> `std.Err [.e=`Junk chr, .line=p.line, .off=p.off]
;;
else
@@ -89,7 +88,12 @@
std.assert(takec(p) == '{', "should only enter 'obj' after '{'")
membs = [][:]
- while true
+ takespace(p)
+ if peekc(p) == '}'
+ takec(p)
+ -> `std.Ok std.mk(`Obj membs)
+ ;;
+ while peekc(p) != '}'
match member(p)
| `std.Ok m:
std.slpush(&membs, m)
@@ -97,6 +101,9 @@
match takec(p)
| ',': /* nothing */
| '}': break
+ | std.Badchar:
+ err = [.e=`End, .line=p.line, .off=p.off]
+ goto error
| chr:
err = [.e=`Junk chr, .line=p.line, .off=p.off]
goto error
@@ -145,18 +152,28 @@
var elts
var err
- std.assert(takec(p) == '[', "should only enter 'obj' after '['")
+ std.assert(takec(p) == '[', "should only enter 'obj' after '['\n")
elts = [][:]
+ takespace(p)
+ if peekc(p) == ']'
+ takec(p)
+ -> `std.Ok std.mk(`Arr elts)
+ ;;
while true
match parseelt(p)
- | `std.Ok e: std.slpush(&elts, e)
+ | `std.Ok e:
+ std.slpush(&elts, e)
| `std.Err e:
err = e
goto error
;;
+ takespace(p)
match takec(p)
| ',': /* nothing */
| ']': break
+ | std.Badchar:
+ err = [.e=`End, .line=p.line, .off=p.off]
+ goto error
| chr:
err = [.e=`Junk chr, .line=p.line, .off=p.off]
goto error
@@ -178,30 +195,47 @@
;;
}
-const parsenum = {p -> std.option(int64)
+const parsenum = {p
var start
+ var ok
start = p.idx
- if peekc(p) == '+' || peekc(p) == '-'
+ if peekc(p) == '-'
p.idx++
;;
- while p.idx < p.str.len
- if !std.isdigit((p.str[p.idx] : char))
- break
- ;;
+ if peekc(p) == '0'
p.idx++
+ else
+ ok = false
+ while p.idx < p.str.len
+ if !std.isdigit((p.str[p.idx] : char))
+ break
+ ;;
+ ok = true
+ p.idx++
+ ;;
+ if !ok
+ -> `std.None
+ ;;
;;
if peekc(p) == '.'
+ ok = false
p.idx++
while p.idx < p.str.len
if !std.isdigit((p.str[p.idx] : char))
break
;;
+ ok = true
p.idx++
;;
+ if !ok
+ -> `std.None
+ ;;
;;
if peekc(p) == 'e' || peekc(p) == 'E'
+ p.idx++
+ ok = false
if peekc(p) == '+' || peekc(p) == '-'
p.idx++
;;
@@ -209,11 +243,15 @@
if !std.isdigit((p.str[p.idx] : char))
break
;;
+ ok = true
p.idx++
;;
+ if !ok
+ -> `std.None
+ ;;
;;
- -> std.intparse(p.str[start:p.idx])
+ -> std.flt64parse(p.str[start:p.idx])
}
const jsonstr = {p
@@ -229,7 +267,6 @@
while p.idx < p.str.len
match takec(p)
| '\\':
- takec(p)
match takec(p)
| '"': std.sbputc(sb, '"')
| '\\': std.sbputc(sb, '\\')
@@ -239,6 +276,13 @@
| 'f': std.sbputc(sb, '\u{0c}')
| 'r': std.sbputc(sb, '\r')
| 't': std.sbputc(sb, '\t')
+ | 'u':
+ match unichar(p)
+ | `std.Some c: std.sbputc(sb, c)
+ | `std.None:
+ err = [.e=`Badesc 'u', .line=p.line, .off=p.off]
+ goto error
+ ;;
| chr:
err = [.e=`Badesc chr, .line=p.line, .off=p.off]
goto error
@@ -257,6 +301,7 @@
idx += std.charlen(chr)
;;
;;
+ err = [.e=`End, .line=p.line, .off=p.off]
:error
std.sbfree(sb)
@@ -263,6 +308,23 @@
-> `std.Err err
}
+const unichar = {p
+ var c, i
+
+ c = 0
+ /* must be exactly 4 hex digits */
+ for i = 0; i < 4; i++
+ match std.charval(takec(p), 16)
+ | -1: -> `std.None
+ | n: c += n*16
+ ;;
+ ;;
+ if i == 0
+ -> `std.None
+ ;;
+ -> `std.Some c
+}
+
const matchprefix = {p, pfx
if std.hasprefix(p.str[p.idx:], pfx)
p.idx += pfx.len
@@ -272,11 +334,10 @@
}
const unescaped = {c
- const tab : byte[128]
-
+ std.put("{x}\n", (c : uint32))
-> c == 0x20 || c == 0x21 || \
(c >= 0x23 && c < 0x5b) || \
- (c > 0x5d && c < 0x10ffff)
+ (c > 0x5d && c <= 0x10ffff)
}
const takespace = {p
@@ -302,8 +363,12 @@
const takec = {p
var c
+ if p.idx == p.str.len
+ -> std.Badchar
+ ;;
c = std.decode(p.str[p.idx:])
p.idx += std.charlen(c)
+ p.off++
if c == '\n'
p.line++
p.off = 1
--- /dev/null
+++ b/lib/json/test/inputs/_n_string_UTF8_surrogate_U+D800.json
@@ -1,0 +1,1 @@
+[""]
\ No newline at end of file
binary files /dev/null b/lib/json/test/inputs/_y_string_utf16.json differ
--- /dev/null
+++ b/lib/json/test/inputs/i_number_neg_int_huge_exp.json
@@ -1,0 +1,1 @@
+[-1e+9999]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_number_pos_double_huge_exp.json
@@ -1,0 +1,1 @@
+[1.5e+9999]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_object_key_lone_2nd_surrogate.json
@@ -1,0 +1,1 @@
+{"\uDFAA":0}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_1st_surrogate_but_2nd_missing.json
@@ -1,0 +1,1 @@
+["\uDADA"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_1st_valid_surrogate_2nd_invalid.json
@@ -1,0 +1,1 @@
+["\uD888\u1234"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_UTF-16_invalid_lonely_surrogate.json
@@ -1,0 +1,1 @@
+["\ud800"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_UTF-16_invalid_surrogate.json
@@ -1,0 +1,1 @@
+["\ud800abc"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_UTF-8_invalid_sequence.json
@@ -1,0 +1,1 @@
+["日ш
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_incomplete_surrogate_and_escape_valid.json
@@ -1,0 +1,1 @@
+["\uD800\n"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_incomplete_surrogate_pair.json
@@ -1,0 +1,1 @@
+["\uDd1ea"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_incomplete_surrogates_escape_valid.json
@@ -1,0 +1,1 @@
+["\uD800\uD800\n"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_inverted_surrogates_U+1D11E.json
@@ -1,0 +1,1 @@
+["\uDd1e\uD834"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_lone_second_surrogate.json
@@ -1,0 +1,1 @@
+["\uDFAA"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_not_in_unicode_range.json
@@ -1,0 +1,1 @@
+["����"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_truncated-utf-8.json
@@ -1,0 +1,1 @@
+["�
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_unicode_U+10FFFE_nonchar.json
@@ -1,0 +1,1 @@
+["\uDBFF\uDFFE"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_unicode_U+1FFFE_nonchar.json
@@ -1,0 +1,1 @@
+["\uD83F\uDFFE"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_unicode_U+FDD0_nonchar.json
@@ -1,0 +1,1 @@
+["\uFDD0"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_string_unicode_U+FFFE_nonchar.json
@@ -1,0 +1,1 @@
+["\uFFFE"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_structure_500_nested_arrays.json
@@ -1,0 +1,1 @@
+[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/i_structure_UTF-8_BOM_empty_object.json
@@ -1,0 +1,1 @@
+{}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_1_true_without_comma.json
@@ -1,0 +1,1 @@
+[1 true]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_a_invalid_utf8.json
@@ -1,0 +1,1 @@
+[a
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_colon_instead_of_comma.json
@@ -1,0 +1,1 @@
+["": 1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_comma_after_close.json
@@ -1,0 +1,1 @@
+[""],
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_comma_and_number.json
@@ -1,0 +1,1 @@
+[,1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_double_comma.json
@@ -1,0 +1,1 @@
+[1,,2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_double_extra_comma.json
@@ -1,0 +1,1 @@
+["x",,]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_extra_close.json
@@ -1,0 +1,1 @@
+["x"]]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_extra_comma.json
@@ -1,0 +1,1 @@
+["",]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_incomplete.json
@@ -1,0 +1,1 @@
+["x"
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_incomplete_invalid_value.json
@@ -1,0 +1,1 @@
+[x
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_inner_array_no_comma.json
@@ -1,0 +1,1 @@
+[3[4]]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_invalid_utf8.json
@@ -1,0 +1,1 @@
+[
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_items_separated_by_semicolon.json
@@ -1,0 +1,1 @@
+[1:2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_just_comma.json
@@ -1,0 +1,1 @@
+[,]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_just_minus.json
@@ -1,0 +1,1 @@
+[-]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_missing_value.json
@@ -1,0 +1,1 @@
+[ , ""]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_newlines_unclosed.json
@@ -1,0 +1,3 @@
+["a",
+4
+,1,
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_number_and_comma.json
@@ -1,0 +1,1 @@
+[1,]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_number_and_several_commas.json
@@ -1,0 +1,1 @@
+[1,,]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_spaces_vertical_tab_formfeed.json
@@ -1,0 +1,1 @@
+["a"\f]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_star_inside.json
@@ -1,0 +1,1 @@
+[*]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_unclosed.json
@@ -1,0 +1,1 @@
+[""
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_unclosed_trailing_comma.json
@@ -1,0 +1,1 @@
+[1,
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_unclosed_with_new_lines.json
@@ -1,0 +1,3 @@
+[1,
+1
+,1
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_array_unclosed_with_object_inside.json
@@ -1,0 +1,1 @@
+[{}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_incomplete_false.json
@@ -1,0 +1,1 @@
+[fals]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_incomplete_null.json
@@ -1,0 +1,1 @@
+[nul]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_incomplete_true.json
@@ -1,0 +1,1 @@
+[tru]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_++.json
@@ -1,0 +1,1 @@
+[++1234]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_+1.json
@@ -1,0 +1,1 @@
+[+1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_+Inf.json
@@ -1,0 +1,1 @@
+[+Inf]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_-01.json
@@ -1,0 +1,1 @@
+[-01]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_-1.0..json
@@ -1,0 +1,1 @@
+[-1.0.]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_-2..json
@@ -1,0 +1,1 @@
+[-2.]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_-NaN.json
@@ -1,0 +1,1 @@
+[-NaN]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_.-1.json
@@ -1,0 +1,1 @@
+[.-1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_.2e-3.json
@@ -1,0 +1,1 @@
+[.2e-3]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_0.1.2.json
@@ -1,0 +1,1 @@
+[0.1.2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_0.3e+.json
@@ -1,0 +1,1 @@
+[0.3e+]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_0.3e.json
@@ -1,0 +1,1 @@
+[0.3e]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_0.e1.json
@@ -1,0 +1,1 @@
+[0.e1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_0_capital_E+.json
@@ -1,0 +1,1 @@
+[0E+]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_0_capital_E.json
@@ -1,0 +1,1 @@
+[0E]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_0e+.json
@@ -1,0 +1,1 @@
+[0e+]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_0e.json
@@ -1,0 +1,1 @@
+[0e]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_1.0e+.json
@@ -1,0 +1,1 @@
+[1.0e+]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_1.0e-.json
@@ -1,0 +1,1 @@
+[1.0e-]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_1.0e.json
@@ -1,0 +1,1 @@
+[1.0e]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_1_000.json
@@ -1,0 +1,1 @@
+[1 000.0]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_1eE2.json
@@ -1,0 +1,1 @@
+[1eE2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_2.e+3.json
@@ -1,0 +1,1 @@
+[2.e+3]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_2.e-3.json
@@ -1,0 +1,1 @@
+[2.e-3]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_2.e3.json
@@ -1,0 +1,1 @@
+[2.e3]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_9.e+.json
@@ -1,0 +1,1 @@
+[9.e+]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_Inf.json
@@ -1,0 +1,1 @@
+[Inf]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_NaN.json
@@ -1,0 +1,1 @@
+[NaN]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_U+FF11_fullwidth_digit_one.json
@@ -1,0 +1,1 @@
+[1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_expression.json
@@ -1,0 +1,1 @@
+[1+2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_hex_1_digit.json
@@ -1,0 +1,1 @@
+[0x1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_hex_2_digits.json
@@ -1,0 +1,1 @@
+[0x42]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_infinity.json
@@ -1,0 +1,1 @@
+[Infinity]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_invalid+-.json
@@ -1,0 +1,1 @@
+[0e+-1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_invalid-negative-real.json
@@ -1,0 +1,1 @@
+[-123.123foo]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_invalid-utf-8-in-bigger-int.json
@@ -1,0 +1,1 @@
+[123
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_invalid-utf-8-in-exponent.json
@@ -1,0 +1,1 @@
+[1e1
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_invalid-utf-8-in-int.json
@@ -1,0 +1,1 @@
+[0�]
--- /dev/null
+++ b/lib/json/test/inputs/n_number_minus_infinity.json
@@ -1,0 +1,1 @@
+[-Infinity]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_minus_sign_with_trailing_garbage.json
@@ -1,0 +1,1 @@
+[-foo]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_minus_space_1.json
@@ -1,0 +1,1 @@
+[- 1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_neg_int_starting_with_zero.json
@@ -1,0 +1,1 @@
+[-012]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_neg_real_without_int_part.json
@@ -1,0 +1,1 @@
+[-.123]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_neg_with_garbage_at_end.json
@@ -1,0 +1,1 @@
+[-1x]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_real_garbage_after_e.json
@@ -1,0 +1,1 @@
+[1ea]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_real_with_invalid_utf8_after_e.json
@@ -1,0 +1,1 @@
+[1e
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_real_without_fractional_part.json
@@ -1,0 +1,1 @@
+[1.]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_starting_with_dot.json
@@ -1,0 +1,1 @@
+[.123]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_then_00.json
@@ -1,0 +1,1 @@
+1
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_with_alpha.json
@@ -1,0 +1,1 @@
+[1.2a-3]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_with_alpha_char.json
@@ -1,0 +1,1 @@
+[1.8011670033376514H-308]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_number_with_leading_zero.json
@@ -1,0 +1,1 @@
+[012]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_bad_value.json
@@ -1,0 +1,1 @@
+["x", truth]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_bracket_key.json
@@ -1,0 +1,1 @@
+{[: "x"}
--- /dev/null
+++ b/lib/json/test/inputs/n_object_comma_instead_of_colon.json
@@ -1,0 +1,1 @@
+{"x", null}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_double_colon.json
@@ -1,0 +1,1 @@
+{"x"::"b"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_emoji.json
@@ -1,0 +1,1 @@
+{🇨🇭}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_garbage_at_end.json
@@ -1,0 +1,1 @@
+{"a":"a" 123}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_key_with_single_quotes.json
@@ -1,0 +1,1 @@
+{key: 'value'}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_missing_colon.json
@@ -1,0 +1,1 @@
+{"a" b}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_missing_key.json
@@ -1,0 +1,1 @@
+{:"b"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_missing_semicolon.json
@@ -1,0 +1,1 @@
+{"a" "b"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_missing_value.json
@@ -1,0 +1,1 @@
+{"a":
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_no-colon.json
@@ -1,0 +1,1 @@
+{"a"
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_non_string_key.json
@@ -1,0 +1,1 @@
+{1:1}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_non_string_key_but_huge_number_instead.json
@@ -1,0 +1,1 @@
+{9999E9999:1}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_pi_in_key_and_trailing_comma.json
@@ -1,0 +1,1 @@
+{"�":"0",}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_repeated_null_null.json
@@ -1,0 +1,1 @@
+{null:null,null:null}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_several_trailing_commas.json
@@ -1,0 +1,1 @@
+{"id":0,,,,,}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_single_quote.json
@@ -1,0 +1,1 @@
+{'a':0}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_trailing_comma.json
@@ -1,0 +1,1 @@
+{"id":0,}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_trailing_comment.json
@@ -1,0 +1,1 @@
+{"a":"b"}/**/
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_trailing_comment_open.json
@@ -1,0 +1,1 @@
+{"a":"b"}/**//
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_trailing_comment_slash_open.json
@@ -1,0 +1,1 @@
+{"a":"b"}//
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_trailing_comment_slash_open_incomplete.json
@@ -1,0 +1,1 @@
+{"a":"b"}/
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_two_commas_in_a_row.json
@@ -1,0 +1,1 @@
+{"a":"b",,"c":"d"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_unquoted_key.json
@@ -1,0 +1,1 @@
+{a: "b"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_unterminated-value.json
@@ -1,0 +1,1 @@
+{"a":"a
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_with_single_string.json
@@ -1,0 +1,1 @@
+{ "foo" : "bar", "a" }
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_object_with_trailing_garbage.json
@@ -1,0 +1,1 @@
+{"a":"b"}#
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_single_space.json
@@ -1,0 +1,1 @@
+
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_1_surrogate_then_escape u.json
@@ -1,0 +1,1 @@
+["\uD800\u"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_1_surrogate_then_escape u1.json
@@ -1,0 +1,1 @@
+["\uD800\u1"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_1_surrogate_then_escape u1x.json
@@ -1,0 +1,1 @@
+["\uD800\u1x"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_1_surrogate_then_escape.json
@@ -1,0 +1,1 @@
+["\uD800\"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_UTF-16_incomplete_surrogate.json
@@ -1,0 +1,1 @@
+["\uD834\uDd"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_accentuated_char_no_quotes.json
@@ -1,0 +1,1 @@
+[é]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_backslash_00.json
@@ -1,0 +1,1 @@
+["\
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_escape_x.json
@@ -1,0 +1,1 @@
+["\x00"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_escaped_backslash_bad.json
@@ -1,0 +1,1 @@
+["\\\"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_escaped_ctrl_char_tab.json
@@ -1,0 +1,1 @@
+["\ "]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_escaped_emoji.json
@@ -1,0 +1,1 @@
+["\🌀"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_incomplete_escape.json
@@ -1,0 +1,1 @@
+["\"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_incomplete_escaped_character.json
@@ -1,0 +1,1 @@
+["\u00A"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_incomplete_surrogate_escape_invalid.json
@@ -1,0 +1,1 @@
+["\uD800\uD800\x"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_invalid-utf-8-in-escape.json
@@ -1,0 +1,1 @@
+["\u�"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_invalid_backslash_esc.json
@@ -1,0 +1,1 @@
+["\a"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_invalid_unicode_escape.json
@@ -1,0 +1,1 @@
+["\uqqqq"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_invalid_utf-8.json
@@ -1,0 +1,1 @@
+["
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_invalid_utf8_after_escape.json
@@ -1,0 +1,1 @@
+["\�"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_iso_latin_1.json
@@ -1,0 +1,1 @@
+["�"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_leading_uescaped_thinspace.json
@@ -1,0 +1,1 @@
+[\u0020"asd"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_lone_utf8_continuation_byte.json
@@ -1,0 +1,1 @@
+["�"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_no_quotes_with_bad_escape.json
@@ -1,0 +1,1 @@
+[\n]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_overlong_sequence_2_bytes.json
@@ -1,0 +1,1 @@
+["��"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_overlong_sequence_6_bytes.json
@@ -1,0 +1,1 @@
+["������"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_overlong_sequence_6_bytes_null.json
@@ -1,0 +1,1 @@
+["������"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_single_doublequote.json
@@ -1,0 +1,1 @@
+"
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_single_quote.json
@@ -1,0 +1,1 @@
+['single quote']
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_single_string_no_double_quotes.json
@@ -1,0 +1,1 @@
+abc
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_start_escape_unclosed.json
@@ -1,0 +1,1 @@
+["\
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_unescaped_crtl_char.json
@@ -1,0 +1,1 @@
+["a
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_unescaped_newline.json
@@ -1,0 +1,2 @@
+["new
+line"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_unescaped_tab.json
@@ -1,0 +1,1 @@
+[" "]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_unicode_CapitalU.json
@@ -1,0 +1,1 @@
+"\UA66D"
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_string_with_trailing_garbage.json
@@ -1,0 +1,1 @@
+""x
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_100000_opening_arrays.json
@@ -1,0 +1,1 @@
+[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_<.>.json
@@ -1,0 +1,1 @@
+<.>
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_<null>.json
@@ -1,0 +1,1 @@
+[<null>]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_U+2060_word_joined.json
@@ -1,0 +1,1 @@
+[]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_UTF8_BOM_no_data.json
@@ -1,0 +1,1 @@
+
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_array_trailing_garbage.json
@@ -1,0 +1,1 @@
+[1]x
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_array_with_extra_array_close.json
@@ -1,0 +1,1 @@
+[1]]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_array_with_unclosed_string.json
@@ -1,0 +1,1 @@
+["asd]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_ascii-unicode-identifier.json
@@ -1,0 +1,1 @@
+aå
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_capitalized_True.json
@@ -1,0 +1,1 @@
+[True]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_close_unopened_array.json
@@ -1,0 +1,1 @@
+1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_comma_instead_of_closing_brace.json
@@ -1,0 +1,1 @@
+{"x": true,
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_double_array.json
@@ -1,0 +1,1 @@
+[][]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_end_array.json
@@ -1,0 +1,1 @@
+]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_incomplete_UTF8_BOM.json
@@ -1,0 +1,1 @@
+��{}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_lone-invalid-utf-8.json
@@ -1,0 +1,1 @@
+
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_lone-open-bracket.json
@@ -1,0 +1,1 @@
+[
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_null-byte-outside-string.json
@@ -1,0 +1,1 @@
+[
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_number_with_trailing_garbage.json
@@ -1,0 +1,1 @@
+2@
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_object_followed_by_closing_object.json
@@ -1,0 +1,1 @@
+{}}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_object_unclosed_no_value.json
@@ -1,0 +1,1 @@
+{"":
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_object_with_comment.json
@@ -1,0 +1,1 @@
+{"a":/*comment*/"b"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_object_with_trailing_garbage.json
@@ -1,0 +1,1 @@
+{"a": true} "x"
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_array_apostrophe.json
@@ -1,0 +1,1 @@
+['
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_array_comma.json
@@ -1,0 +1,1 @@
+[,
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_array_object.json
@@ -1,0 +1,1 @@
+[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":[{"":
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_array_open_object.json
@@ -1,0 +1,1 @@
+[{
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_array_open_string.json
@@ -1,0 +1,1 @@
+["a
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_array_string.json
@@ -1,0 +1,1 @@
+["a"
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_object.json
@@ -1,0 +1,1 @@
+{
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_object_close_array.json
@@ -1,0 +1,1 @@
+{]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_object_comma.json
@@ -1,0 +1,1 @@
+{,
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_object_open_array.json
@@ -1,0 +1,1 @@
+{[
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_object_open_string.json
@@ -1,0 +1,1 @@
+{"a
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_object_string_with_apostrophes.json
@@ -1,0 +1,1 @@
+{'a'
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_open_open.json
@@ -1,0 +1,1 @@
+["\{["\{["\{["\{
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_single_point.json
@@ -1,0 +1,1 @@
+
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_single_star.json
@@ -1,0 +1,1 @@
+*
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_trailing_#.json
@@ -1,0 +1,1 @@
+{"a":"b"}#{}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_uescaped_LF_before_string.json
@@ -1,0 +1,1 @@
+[\u000A""]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_unclosed_array.json
@@ -1,0 +1,1 @@
+[1
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_unclosed_array_partial_null.json
@@ -1,0 +1,1 @@
+[ false, nul
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_unclosed_array_unfinished_false.json
@@ -1,0 +1,1 @@
+[ true, fals
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_unclosed_array_unfinished_true.json
@@ -1,0 +1,1 @@
+[ false, tru
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_unclosed_object.json
@@ -1,0 +1,1 @@
+{"asd":"asd"
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_unicode-identifier.json
@@ -1,0 +1,1 @@
+å
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_whitespace_U+2060_word_joiner.json
@@ -1,0 +1,1 @@
+[]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/n_structure_whitespace_formfeed.json
@@ -1,0 +1,1 @@
+[]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_arraysWithSpaces.json
@@ -1,0 +1,1 @@
+[[] ]
--- /dev/null
+++ b/lib/json/test/inputs/y_array_empty-string.json
@@ -1,0 +1,1 @@
+[""]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_empty.json
@@ -1,0 +1,1 @@
+[]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_ending_with_newline.json
@@ -1,0 +1,1 @@
+["a"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_false.json
@@ -1,0 +1,1 @@
+[false]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_heterogeneous.json
@@ -1,0 +1,1 @@
+[null, 1, "1", {}]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_null.json
@@ -1,0 +1,1 @@
+[null]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_with_1_and_newline.json
@@ -1,0 +1,2 @@
+[1
+]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_with_leading_space.json
@@ -1,0 +1,1 @@
+ [1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_with_several_null.json
@@ -1,0 +1,1 @@
+[1,null,null,null,2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_array_with_trailing_space.json
@@ -1,0 +1,1 @@
+[2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number.json
@@ -1,0 +1,1 @@
+[123e65]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_0e+1.json
@@ -1,0 +1,1 @@
+[0e+1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_0e1.json
@@ -1,0 +1,1 @@
+[0e1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_after_space.json
@@ -1,0 +1,1 @@
+[ 4]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_double_close_to_zero.json
@@ -1,0 +1,1 @@
+[-0.000000000000000000000000000000000000000000000000000000000000000000000000000001]
--- /dev/null
+++ b/lib/json/test/inputs/y_number_double_huge_neg_exp.json
@@ -1,0 +1,1 @@
+[123.456e-789]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_huge_exp.json
@@ -1,0 +1,1 @@
+[0.4e00669999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999969999999006]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_int_with_exp.json
@@ -1,0 +1,1 @@
+[20e1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_minus_zero.json
@@ -1,0 +1,1 @@
+[-0]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_negative_int.json
@@ -1,0 +1,1 @@
+[-123]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_negative_one.json
@@ -1,0 +1,1 @@
+[-1]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_negative_zero.json
@@ -1,0 +1,1 @@
+[-0]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_capital_e.json
@@ -1,0 +1,1 @@
+[1E22]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_capital_e_neg_exp.json
@@ -1,0 +1,1 @@
+[1E-2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_capital_e_pos_exp.json
@@ -1,0 +1,1 @@
+[1E+2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_exponent.json
@@ -1,0 +1,1 @@
+[123e45]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_fraction_exponent.json
@@ -1,0 +1,1 @@
+[123.456e78]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_neg_exp.json
@@ -1,0 +1,1 @@
+[1e-2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_neg_overflow.json
@@ -1,0 +1,1 @@
+[-123123e100000]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_pos_exponent.json
@@ -1,0 +1,1 @@
+[1e+2]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_pos_overflow.json
@@ -1,0 +1,1 @@
+[123123e100000]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_real_underflow.json
@@ -1,0 +1,1 @@
+[123e-10000000]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_simple_int.json
@@ -1,0 +1,1 @@
+[123]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_simple_real.json
@@ -1,0 +1,1 @@
+[123.456789]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_too_big_neg_int.json
@@ -1,0 +1,1 @@
+[-123123123123123123123123123123]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_too_big_pos_int.json
@@ -1,0 +1,1 @@
+[100000000000000000000]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_number_very_big_negative_int.json
@@ -1,0 +1,1 @@
+[-237462374673276894279832749832423479823246327846]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object.json
@@ -1,0 +1,1 @@
+{"asd":"sdf", "dfg":"fgh"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_basic.json
@@ -1,0 +1,1 @@
+{"asd":"sdf"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_duplicated_key.json
@@ -1,0 +1,1 @@
+{"a":"b","a":"c"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_duplicated_key_and_value.json
@@ -1,0 +1,1 @@
+{"a":"b","a":"b"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_empty.json
@@ -1,0 +1,1 @@
+{}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_empty_key.json
@@ -1,0 +1,1 @@
+{"":0}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_escaped_null_in_key.json
@@ -1,0 +1,1 @@
+{"foo\u0000bar": 42}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_extreme_numbers.json
@@ -1,0 +1,1 @@
+{ "min": -1.0e+28, "max": 1.0e+28 }
--- /dev/null
+++ b/lib/json/test/inputs/y_object_long_strings.json
@@ -1,0 +1,1 @@
+{"x":[{"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}], "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_simple.json
@@ -1,0 +1,1 @@
+{"a":[]}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_string_unicode.json
@@ -1,0 +1,1 @@
+{"title":"\u041f\u043e\u043b\u0442\u043e\u0440\u0430 \u0417\u0435\u043c\u043b\u0435\u043a\u043e\u043f\u0430" }
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_object_with_newlines.json
@@ -1,0 +1,3 @@
+{
+"a": "b"
+}
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_1_2_3_bytes_UTF-8_sequences.json
@@ -1,0 +1,1 @@
+["\u0060\u012a\u12AB"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_UTF-16_Surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json
@@ -1,0 +1,1 @@
+["\uD834\uDd1e"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_accepted_surrogate_pair.json
@@ -1,0 +1,1 @@
+["\uD801\udc37"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_accepted_surrogate_pairs.json
@@ -1,0 +1,1 @@
+["\ud83d\ude39\ud83d\udc8d"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_allowed_escapes.json
@@ -1,0 +1,1 @@
+["\"\\\/\b\f\n\r\t"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_backslash_and_u_escaped_zero.json
@@ -1,0 +1,1 @@
+["\\u0000"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_backslash_doublequotes.json
@@ -1,0 +1,1 @@
+["\""]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_comments.json
@@ -1,0 +1,1 @@
+["a/*b*/c/*d//e"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_double_escape_a.json
@@ -1,0 +1,1 @@
+["\\a"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_double_escape_n.json
@@ -1,0 +1,1 @@
+["\\n"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_escaped_control_character.json
@@ -1,0 +1,1 @@
+["\u0012"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_escaped_noncharacter.json
@@ -1,0 +1,1 @@
+["\uFFFF"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_in_array.json
@@ -1,0 +1,1 @@
+["asd"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_in_array_with_leading_space.json
@@ -1,0 +1,1 @@
+[ "asd"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_last_surrogates_1_and_2.json
@@ -1,0 +1,1 @@
+["\uDBFF\uDFFF"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_newline_uescaped.json
@@ -1,0 +1,1 @@
+["new\u00A0line"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_nonCharacterInUTF-8_U+10FFFF.json
@@ -1,0 +1,1 @@
+[""]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_nonCharacterInUTF-8_U+1FFFF.json
@@ -1,0 +1,1 @@
+[""]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_nonCharacterInUTF-8_U+FFFF.json
@@ -1,0 +1,1 @@
+[""]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_null_escape.json
@@ -1,0 +1,1 @@
+["\u0000"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_one-byte-utf-8.json
@@ -1,0 +1,1 @@
+["\u002c"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_pi.json
@@ -1,0 +1,1 @@
+["π"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_simple_ascii.json
@@ -1,0 +1,1 @@
+["asd "]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_space.json
@@ -1,0 +1,1 @@
+" "
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_three-byte-utf-8.json
@@ -1,0 +1,1 @@
+["\u0821"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_two-byte-utf-8.json
@@ -1,0 +1,1 @@
+["\u0123"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_u+2028_line_sep.json
@@ -1,0 +1,1 @@
+[" "]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_u+2029_par_sep.json
@@ -1,0 +1,1 @@
+[" "]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_uEscape.json
@@ -1,0 +1,1 @@
+["\u0061\u30af\u30EA\u30b9"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_unescaped_char_delete.json
@@ -1,0 +1,1 @@
+[""]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_unicode.json
@@ -1,0 +1,1 @@
+["\uA66D"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_unicodeEscapedBackslash.json
@@ -1,0 +1,1 @@
+["\u005C"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_unicode_2.json
@@ -1,0 +1,1 @@
+["⍂㈴⍂"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json
@@ -1,0 +1,1 @@
+["\u200B"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_unicode_U+2064_invisible_plus.json
@@ -1,0 +1,1 @@
+["\u2064"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_unicode_escaped_double_quote.json
@@ -1,0 +1,1 @@
+["\u0022"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_utf8.json
@@ -1,0 +1,1 @@
+["€𝄞"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_string_with_del_character.json
@@ -1,0 +1,1 @@
+["aa"]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_lonely_false.json
@@ -1,0 +1,1 @@
+false
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_lonely_int.json
@@ -1,0 +1,1 @@
+42
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_lonely_negative_real.json
@@ -1,0 +1,1 @@
+-0.1
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_lonely_null.json
@@ -1,0 +1,1 @@
+null
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_lonely_string.json
@@ -1,0 +1,1 @@
+"asd"
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_lonely_true.json
@@ -1,0 +1,1 @@
+true
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_string_empty.json
@@ -1,0 +1,1 @@
+""
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_trailing_newline.json
@@ -1,0 +1,1 @@
+["a"]
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_true_in_array.json
@@ -1,0 +1,1 @@
+[true]
\ No newline at end of file
--- /dev/null
+++ b/lib/json/test/inputs/y_structure_whitespace_array.json
@@ -1,0 +1,1 @@
+ []
\ No newline at end of file
--- a/lib/json/test/parse.myr
+++ b/lib/json/test/parse.myr
@@ -119,6 +119,8 @@
;;
}]
][:])
+ | '_':
+ std.put("skip: {}\n", f)
| 'i':
std.put("ignoring implementation defined test {}\n", f)
| wat:
--- a/lib/json/types.myr
+++ b/lib/json/types.myr
@@ -17,8 +17,8 @@
;;
type errtype = union
- `Junk char
`Badesc char
+ `Junk char
`End
;;
;;
--
⑨