shithub: mc

Download patch

ref: e3a9307d99e1a2936e63b6ffa5d80a5929d4b549
parent: 2edc2786c55409339a666cd0dc41e21099017d24
parent: 673032b9d80278ccd16b5152c98cfd252e083bdb
author: Ori Bernstein <[email protected]>
date: Wed Feb 8 19:20:20 EST 2017

Merge libjson

sed: Output line too long
--- a/lib/bld.sub
+++ b/lib/bld.sub
@@ -1,13 +1,14 @@
 sub =
 	bio
-	date
 	crypto
+	date
 	escfmt
-	inifile
 	fileutil
+	inifile
+	json
 	regex
 	std
 	sys
-	thread
 	testr
+	thread
 ;;
--- /dev/null
+++ b/lib/json/bld.sub
@@ -1,0 +1,9 @@
+lib json =
+	types.myr
+	parse.myr
+	fmt.myr
+
+        lib ../sys:sys
+        lib ../std:std
+;;
+
--- /dev/null
+++ b/lib/json/fmt.myr
@@ -1,0 +1,86 @@
+use std
+
+use "types"
+
+pkg json =
+;;
+
+const __init__ = {
+	var j : elt
+
+	std.fmtinstall(std.typeof(&j), jsonfmt, [][:])
+}
+
+const jsonfmt = {sb, ap, opts
+	var e : elt#
+
+	e = std.vanext(ap)
+	eltfmt(sb, e, 0)
+}
+
+const eltfmt = {sb, e, ind
+	match e
+	| &(`Null):	std.sbfmt(sb, "null")
+	| &(`Bool b):	std.sbfmt(sb, "{}", b)
+	| &(`Num n):	std.sbfmt(sb, "{}", n)
+	| &(`Str s):	jstrfmt(sb, s)
+	| &(`Arr a):	arrfmt(sb, a, ind)
+	| &(`Obj o):	objfmt(sb, o, ind)
+	;;
+}
+
+
+const jstrfmt = {sb, str
+	std.sbputs(sb, "\"")
+	for c in str
+		match (c : char)
+		| '\x0c':	std.sbputs(sb, "\\f")
+		| '\\':	std.sbputs(sb, "\\\\")
+		| '\n': std.sbputs(sb, "\\n")
+		| '\r':	std.sbputs(sb, "\\r")
+		| '\t': std.sbputs(sb, "\\t")
+		| _:	std.sbputb(sb, c)
+		;;
+	;;
+	std.sbputs(sb, "\"")
+}
+
+const arrfmt = {sb, arr, ind
+	var sep
+
+	sep = ""
+	std.sbputs(sb, "[\n")
+	for e in arr
+		std.sbputs(sb, sep)
+		indent(sb, ind + 1)
+		eltfmt(sb, e, ind + 1)
+		sep = ",\n"
+	;;
+	std.sbputs(sb, "\n")
+	indent(sb, ind)
+	std.sbputs(sb, "]")
+}
+
+const objfmt = {sb, obj, ind
+	var sep
+
+	sep = ""
+	std.sbputs(sb, "{\n")
+	for (k, v) in obj
+		std.sbputs(sb, sep)
+		indent(sb, ind + 1)
+		jstrfmt(sb, k)
+		std.sbputs(sb, ": ")
+		eltfmt(sb, v, ind + 1)
+		sep = ",\n"
+	;;
+	std.sbputs(sb, "\n")
+	indent(sb, ind)
+	std.sbputs(sb, "}")
+}
+
+const indent = {sb, ind
+	for var i = 0; i < ind; i++
+		std.sbputc(sb, '\t')
+	;;
+}
--- /dev/null
+++ b/lib/json/j.myr
@@ -1,0 +1,18 @@
+use std
+use json
+
+const main = {args : byte[:][:]
+	var data
+
+	for arg in args[1:]
+		data = std.try(std.slurp(arg))
+		match json.parse(data)
+		| `std.Ok j:
+			std.put("{}\n", j)
+			json.free(j)
+		| `std.Err e:
+			std.put("{}\n", e)
+		;;
+		std.slfree(data)
+	;;
+}
--- /dev/null
+++ b/lib/json/parse.myr
@@ -1,0 +1,401 @@
+use std
+
+use "types"
+
+pkg json =
+	const parse	: (str : byte[:] -> std.result(elt#, err))
+	const free	: (j : elt# -> void)
+;;
+
+const Maxdepth = 1024
+
+type parser = struct
+	str	: byte[:]
+	depth	: std.size
+	line	: std.size
+	off	: std.size
+	idx	: std.size
+;;
+
+const parse = {str
+	var parser : parser
+
+	parser = [
+		.str = str,
+		.depth = 0,
+		.line = 1,
+		.off = 1,
+		.idx = 0,
+	]
+	match parseelt(&parser)
+	| `std.Ok j:
+		takespace(&parser)
+		if parser.idx != parser.str.len
+			free(j)
+			-> `std.Err [
+				.e=`Junk std.decode(parser.str[parser.idx:]),
+				.line=parser.line,
+				.off=parser.off
+			]
+		;;
+		-> `std.Ok j
+	| `std.Err e:
+		-> `std.Err e
+	;;
+}
+
+const free = {j
+	match j
+	| &(`Null):	/* nothing */
+	| &(`Bool _):	/* nothing */
+	| &(`Num _):	/* nothing */
+	| &(`Str s):	std.slfree(s)
+	| &(`Arr a):
+		for e in a
+			free(e)
+		;;
+	| &(`Obj o):
+		for (k, v) in o
+			std.slfree(k)
+			free(v)
+		;;
+	;;
+}
+
+const parseelt = {p
+	takespace(p)
+	match peekc(p)
+	| '{':	-> parseobj(p)
+	| '[':	-> parsearr(p)
+	| '"':	-> parsestr(p)
+	| chr:
+		if matchprefix(p, "false")
+			-> `std.Ok std.mk(`Bool false)
+		elif matchprefix(p, "true")
+			-> `std.Ok std.mk(`Bool true)
+		elif matchprefix(p, "null")
+			-> `std.Ok std.mk(`Null)
+		elif std.isdigit(peekc(p)) || peekc(p) == '-'
+			match parsenum(p)
+			| `std.Some n:	-> `std.Ok std.mk(`Num n)
+			| `std.None:	-> `std.Err [.e=`Junk chr, .line=p.line, .off=p.off]
+			;;
+		else
+			-> `std.Err [.e=`Junk chr, .line=p.line, .off=p.off]
+		;;
+	;;
+}
+
+const parseobj = {p
+	var membs
+	var err
+
+	std.assert(takec(p) == '{', "should only enter 'obj' after '{'")
+	membs = [][:]
+	if !enter(p)
+		err = [.e = `Depth, .line=p.line, .off=p.off]
+		goto error
+	;;
+	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)
+			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
+			;;
+		| `std.Err e:
+			err = e
+			goto error
+		;;
+	;;
+	exit(p)
+	-> `std.Ok std.mk(`Obj membs)
+:error
+	for (k, v) in membs
+		std.slfree(k)
+		free(v)
+	;;
+	std.slfree(membs)
+	exit(p)
+	-> `std.Err err
+}
+
+const member = {p
+	var str
+
+	takespace(p)
+	match jsonstr(p)
+	| `std.Ok s:	str = s
+	| `std.Err e:	-> `std.Err e
+	;;
+
+	takespace(p)
+	match takec(p)
+	| ':':	/* nothing */
+	| chr:	-> `std.Err [.e=`Junk chr, .line=p.line, .off=p.off]
+	;;
+
+	takespace(p)
+	match parseelt(p)
+	| `std.Ok elt:
+		-> `std.Ok (str, elt)
+	| `std.Err e:
+		std.slfree(str)
+		-> `std.Err e
+	;;
+}
+
+const parsearr = {p -> std.result(elt#, err)
+	var elts
+	var err
+
+	std.assert(takec(p) == '[', "should only enter 'obj' after '['\n")
+	elts = [][:]
+	if !enter(p)
+		err = [.e = `Depth, .line=p.line, .off=p.off]
+		goto error
+	;;
+	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.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
+		;;
+	;;
+	exit(p)
+	-> `std.Ok std.mk(`Arr elts)
+:error
+	for e in elts
+		free(e)
+	;;
+	std.slfree(elts)
+	exit(p)
+	-> `std.Err err
+}
+
+const parsestr = {p
+	match jsonstr(p)
+	| `std.Ok str:	-> `std.Ok std.mk(`Str str)
+	| `std.Err e:	-> `std.Err e
+	;;
+}
+
+const parsenum = {p
+	var start
+	var ok
+
+	start = p.idx
+	if peekc(p) == '-'
+		p.idx++
+	;;
+	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++
+		;;
+		while p.idx < p.str.len
+			if !std.isdigit((p.str[p.idx] : char))
+				break
+			;;
+			ok = true
+			p.idx++
+		;;
+		if !ok
+			-> `std.None
+		;;
+	;;
+
+	-> std.flt64parse(p.str[start:p.idx])
+}
+
+const jsonstr = {p
+	var sb, idx, err
+
+	sb = std.mksb()
+	match takec(p)
+	| '"':	/* nothing */
+	| chr:
+		err = [.e=`Junk chr, .line=p.line, .off=p.off]
+		goto error
+	;;
+	while p.idx < p.str.len
+		match takec(p)
+		| '\\':
+			match takec(p)
+			| '"':	std.sbputc(sb, '"')
+			| '\\':	std.sbputc(sb, '\\')
+			| '/':	std.sbputc(sb, '/')
+			| 'b':	std.sbputc(sb, '\b')
+			| 'n':	std.sbputc(sb, '\n')
+			| '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
+			;;
+		| '"':
+			-> `std.Ok std.sbfin(sb)
+		| std.Badchar:
+			err = [.e=`Junk std.Badchar, .line=p.line, .off=p.off]
+			goto error
+		| chr:
+			if !unescaped(chr)
+				err = [.e=`Junk chr, .line=p.line, .off=p.off]
+				goto error
+			;;
+			std.sbputc(sb, chr)
+			idx += std.charlen(chr)
+		;;
+	;;
+	err = [.e=`End, .line=p.line, .off=p.off]
+
+:error
+	std.sbfree(sb)
+	-> `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
+		-> true
+	;;
+	-> false
+}
+
+const unescaped = {c
+	-> c == 0x20 || c == 0x21 || \
+		(c >= 0x23 && c < 0x5b) || \
+		(c > 0x5d && c <= 0x10ffff)
+}
+
+const takespace = {p
+	while p.idx < p.str.len
+		match (p.str[p.idx] : char)
+		| ' ':
+		| '\t':
+		| '\r':
+		| '\n':
+			p.line++
+			p.off=1
+		| _:
+			break
+		;;
+		p.idx++
+	;;
+}
+
+const peekc = {p
+	-> std.decode(p.str[p.idx:])
+}
+
+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
+	;;
+	-> c
+}
+
+const enter = {p
+	p.depth++
+	-> p.depth <= Maxdepth
+}
+
+const exit = {p
+	p.depth--
+}
--- /dev/null
+++ b/lib/json/test/inputs/LICENSE
@@ -1,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Nicolas Seriot
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
--- /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 @@
+[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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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 @@
+[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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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 @@