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/libsed: Output line too long /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 @@
+[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
\ 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 @@