├── .gitignore ├── COPYING ├── LICENSE ├── README.md ├── dirty-json.d.ts ├── dirty-json.js ├── lexer.js ├── package.json ├── parser.js └── test ├── lexer_test.js ├── nst ├── disabled │ ├── y_string_nonCharacterInUTF-8_U+10FFFF.json │ ├── y_string_nonCharacterInUTF-8_U+1FFFF.json │ ├── y_string_nonCharacterInUTF-8_U+FFFF.json │ ├── y_string_pi.json │ ├── y_string_u+2028_line_sep.json │ ├── y_string_u+2029_par_sep.json │ ├── y_string_unicode_2.json │ └── y_string_utf8.json ├── y_array_arraysWithSpaces.json ├── y_array_empty-string.json ├── y_array_empty.json ├── y_array_ending_with_newline.json ├── y_array_false.json ├── y_array_heterogeneous.json ├── y_array_null.json ├── y_array_with_1_and_newline.json ├── y_array_with_leading_space.json ├── y_array_with_several_null.json ├── y_array_with_trailing_space.json ├── y_number.json ├── y_number_0e+1.json ├── y_number_0e1.json ├── y_number_after_space.json ├── y_number_double_close_to_zero.json ├── y_number_int_with_exp.json ├── y_number_minus_zero.json ├── y_number_negative_int.json ├── y_number_negative_one.json ├── y_number_negative_zero.json ├── y_number_real_capital_e.json ├── y_number_real_capital_e_neg_exp.json ├── y_number_real_capital_e_pos_exp.json ├── y_number_real_exponent.json ├── y_number_real_fraction_exponent.json ├── y_number_real_neg_exp.json ├── y_number_real_pos_exponent.json ├── y_number_simple_int.json ├── y_number_simple_real.json ├── y_object.json ├── y_object_basic.json ├── y_object_duplicated_key.json ├── y_object_duplicated_key_and_value.json ├── y_object_empty.json ├── y_object_empty_key.json ├── y_object_escaped_null_in_key.json ├── y_object_extreme_numbers.json ├── y_object_long_strings.json ├── y_object_simple.json ├── y_object_string_unicode.json ├── y_object_with_newlines.json ├── y_string_1_2_3_bytes_UTF-8_sequences.json ├── y_string_accepted_surrogate_pair.json ├── y_string_accepted_surrogate_pairs.json ├── y_string_allowed_escapes.json ├── y_string_backslash_and_u_escaped_zero.json ├── y_string_backslash_doublequotes.json ├── y_string_comments.json ├── y_string_double_escape_a.json ├── y_string_double_escape_n.json ├── y_string_escaped_control_character.json ├── y_string_escaped_noncharacter.json ├── y_string_in_array.json ├── y_string_in_array_with_leading_space.json ├── y_string_last_surrogates_1_and_2.json ├── y_string_nbsp_uescaped.json ├── y_string_null_escape.json ├── y_string_one-byte-utf-8.json ├── y_string_simple_ascii.json ├── y_string_space.json ├── y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json ├── y_string_three-byte-utf-8.json ├── y_string_two-byte-utf-8.json ├── y_string_uEscape.json ├── y_string_uescaped_newline.json ├── y_string_unescaped_char_delete.json ├── y_string_unicode.json ├── y_string_unicodeEscapedBackslash.json ├── y_string_unicode_U+10FFFE_nonchar.json ├── y_string_unicode_U+1FFFE_nonchar.json ├── y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json ├── y_string_unicode_U+2064_invisible_plus.json ├── y_string_unicode_U+FDD0_nonchar.json ├── y_string_unicode_U+FFFE_nonchar.json ├── y_string_unicode_escaped_double_quote.json ├── y_string_with_del_character.json ├── y_structure_lonely_false.json ├── y_structure_lonely_int.json ├── y_structure_lonely_negative_real.json ├── y_structure_lonely_null.json ├── y_structure_lonely_string.json ├── y_structure_lonely_true.json ├── y_structure_string_empty.json ├── y_structure_trailing_newline.json ├── y_structure_true_in_array.json └── y_structure_whitespace_array.json └── parser_test.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *~ 3 | 4 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/COPYING -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/README.md -------------------------------------------------------------------------------- /dirty-json.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/dirty-json.d.ts -------------------------------------------------------------------------------- /dirty-json.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/dirty-json.js -------------------------------------------------------------------------------- /lexer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/lexer.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/package.json -------------------------------------------------------------------------------- /parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/parser.js -------------------------------------------------------------------------------- /test/lexer_test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/lexer_test.js -------------------------------------------------------------------------------- /test/nst/disabled/y_string_nonCharacterInUTF-8_U+10FFFF.json: -------------------------------------------------------------------------------- 1 | ["􏿿"] -------------------------------------------------------------------------------- /test/nst/disabled/y_string_nonCharacterInUTF-8_U+1FFFF.json: -------------------------------------------------------------------------------- 1 | ["𛿿"] -------------------------------------------------------------------------------- /test/nst/disabled/y_string_nonCharacterInUTF-8_U+FFFF.json: -------------------------------------------------------------------------------- 1 | ["￿"] -------------------------------------------------------------------------------- /test/nst/disabled/y_string_pi.json: -------------------------------------------------------------------------------- 1 | ["π"] -------------------------------------------------------------------------------- /test/nst/disabled/y_string_u+2028_line_sep.json: -------------------------------------------------------------------------------- 1 | ["
"] -------------------------------------------------------------------------------- /test/nst/disabled/y_string_u+2029_par_sep.json: -------------------------------------------------------------------------------- 1 | ["
"] -------------------------------------------------------------------------------- /test/nst/disabled/y_string_unicode_2.json: -------------------------------------------------------------------------------- 1 | ["⍂㈴⍂"] -------------------------------------------------------------------------------- /test/nst/disabled/y_string_utf8.json: -------------------------------------------------------------------------------- 1 | ["€𝄞"] -------------------------------------------------------------------------------- /test/nst/y_array_arraysWithSpaces.json: -------------------------------------------------------------------------------- 1 | [[] ] -------------------------------------------------------------------------------- /test/nst/y_array_empty-string.json: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /test/nst/y_array_empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/nst/y_array_ending_with_newline.json: -------------------------------------------------------------------------------- 1 | ["a"] -------------------------------------------------------------------------------- /test/nst/y_array_false.json: -------------------------------------------------------------------------------- 1 | [false] -------------------------------------------------------------------------------- /test/nst/y_array_heterogeneous.json: -------------------------------------------------------------------------------- 1 | [null, 1, "1", {}] -------------------------------------------------------------------------------- /test/nst/y_array_null.json: -------------------------------------------------------------------------------- 1 | [null] -------------------------------------------------------------------------------- /test/nst/y_array_with_1_and_newline.json: -------------------------------------------------------------------------------- 1 | [1 2 | ] -------------------------------------------------------------------------------- /test/nst/y_array_with_leading_space.json: -------------------------------------------------------------------------------- 1 | [1] -------------------------------------------------------------------------------- /test/nst/y_array_with_several_null.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_array_with_several_null.json -------------------------------------------------------------------------------- /test/nst/y_array_with_trailing_space.json: -------------------------------------------------------------------------------- 1 | [2] -------------------------------------------------------------------------------- /test/nst/y_number.json: -------------------------------------------------------------------------------- 1 | [123e65] -------------------------------------------------------------------------------- /test/nst/y_number_0e+1.json: -------------------------------------------------------------------------------- 1 | [0e+1] -------------------------------------------------------------------------------- /test/nst/y_number_0e1.json: -------------------------------------------------------------------------------- 1 | [0e1] -------------------------------------------------------------------------------- /test/nst/y_number_after_space.json: -------------------------------------------------------------------------------- 1 | [ 4] -------------------------------------------------------------------------------- /test/nst/y_number_double_close_to_zero.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_number_double_close_to_zero.json -------------------------------------------------------------------------------- /test/nst/y_number_int_with_exp.json: -------------------------------------------------------------------------------- 1 | [20e1] -------------------------------------------------------------------------------- /test/nst/y_number_minus_zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /test/nst/y_number_negative_int.json: -------------------------------------------------------------------------------- 1 | [-123] -------------------------------------------------------------------------------- /test/nst/y_number_negative_one.json: -------------------------------------------------------------------------------- 1 | [-1] -------------------------------------------------------------------------------- /test/nst/y_number_negative_zero.json: -------------------------------------------------------------------------------- 1 | [-0] -------------------------------------------------------------------------------- /test/nst/y_number_real_capital_e.json: -------------------------------------------------------------------------------- 1 | [1E22] -------------------------------------------------------------------------------- /test/nst/y_number_real_capital_e_neg_exp.json: -------------------------------------------------------------------------------- 1 | [1E-2] -------------------------------------------------------------------------------- /test/nst/y_number_real_capital_e_pos_exp.json: -------------------------------------------------------------------------------- 1 | [1E+2] -------------------------------------------------------------------------------- /test/nst/y_number_real_exponent.json: -------------------------------------------------------------------------------- 1 | [123e45] -------------------------------------------------------------------------------- /test/nst/y_number_real_fraction_exponent.json: -------------------------------------------------------------------------------- 1 | [123.456e78] -------------------------------------------------------------------------------- /test/nst/y_number_real_neg_exp.json: -------------------------------------------------------------------------------- 1 | [1e-2] -------------------------------------------------------------------------------- /test/nst/y_number_real_pos_exponent.json: -------------------------------------------------------------------------------- 1 | [1e+2] -------------------------------------------------------------------------------- /test/nst/y_number_simple_int.json: -------------------------------------------------------------------------------- 1 | [123] -------------------------------------------------------------------------------- /test/nst/y_number_simple_real.json: -------------------------------------------------------------------------------- 1 | [123.456789] -------------------------------------------------------------------------------- /test/nst/y_object.json: -------------------------------------------------------------------------------- 1 | {"asd":"sdf", "dfg":"fgh"} -------------------------------------------------------------------------------- /test/nst/y_object_basic.json: -------------------------------------------------------------------------------- 1 | {"asd":"sdf"} -------------------------------------------------------------------------------- /test/nst/y_object_duplicated_key.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_object_duplicated_key.json -------------------------------------------------------------------------------- /test/nst/y_object_duplicated_key_and_value.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_object_duplicated_key_and_value.json -------------------------------------------------------------------------------- /test/nst/y_object_empty.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/nst/y_object_empty_key.json: -------------------------------------------------------------------------------- 1 | {"":0} -------------------------------------------------------------------------------- /test/nst/y_object_escaped_null_in_key.json: -------------------------------------------------------------------------------- 1 | {"foo\u0000bar": 42} -------------------------------------------------------------------------------- /test/nst/y_object_extreme_numbers.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_object_extreme_numbers.json -------------------------------------------------------------------------------- /test/nst/y_object_long_strings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_object_long_strings.json -------------------------------------------------------------------------------- /test/nst/y_object_simple.json: -------------------------------------------------------------------------------- 1 | {"a":[]} -------------------------------------------------------------------------------- /test/nst/y_object_string_unicode.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_object_string_unicode.json -------------------------------------------------------------------------------- /test/nst/y_object_with_newlines.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": "b" 3 | } -------------------------------------------------------------------------------- /test/nst/y_string_1_2_3_bytes_UTF-8_sequences.json: -------------------------------------------------------------------------------- 1 | ["\u0060\u012a\u12AB"] -------------------------------------------------------------------------------- /test/nst/y_string_accepted_surrogate_pair.json: -------------------------------------------------------------------------------- 1 | ["\uD801\udc37"] -------------------------------------------------------------------------------- /test/nst/y_string_accepted_surrogate_pairs.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_string_accepted_surrogate_pairs.json -------------------------------------------------------------------------------- /test/nst/y_string_allowed_escapes.json: -------------------------------------------------------------------------------- 1 | ["\"\\\/\b\f\n\r\t"] -------------------------------------------------------------------------------- /test/nst/y_string_backslash_and_u_escaped_zero.json: -------------------------------------------------------------------------------- 1 | ["\\u0000"] -------------------------------------------------------------------------------- /test/nst/y_string_backslash_doublequotes.json: -------------------------------------------------------------------------------- 1 | ["\""] -------------------------------------------------------------------------------- /test/nst/y_string_comments.json: -------------------------------------------------------------------------------- 1 | ["a/*b*/c/*d//e"] -------------------------------------------------------------------------------- /test/nst/y_string_double_escape_a.json: -------------------------------------------------------------------------------- 1 | ["\\a"] -------------------------------------------------------------------------------- /test/nst/y_string_double_escape_n.json: -------------------------------------------------------------------------------- 1 | ["\\n"] -------------------------------------------------------------------------------- /test/nst/y_string_escaped_control_character.json: -------------------------------------------------------------------------------- 1 | ["\u0012"] -------------------------------------------------------------------------------- /test/nst/y_string_escaped_noncharacter.json: -------------------------------------------------------------------------------- 1 | ["\uFFFF"] -------------------------------------------------------------------------------- /test/nst/y_string_in_array.json: -------------------------------------------------------------------------------- 1 | ["asd"] -------------------------------------------------------------------------------- /test/nst/y_string_in_array_with_leading_space.json: -------------------------------------------------------------------------------- 1 | [ "asd"] -------------------------------------------------------------------------------- /test/nst/y_string_last_surrogates_1_and_2.json: -------------------------------------------------------------------------------- 1 | ["\uDBFF\uDFFF"] -------------------------------------------------------------------------------- /test/nst/y_string_nbsp_uescaped.json: -------------------------------------------------------------------------------- 1 | ["new\u00A0line"] -------------------------------------------------------------------------------- /test/nst/y_string_null_escape.json: -------------------------------------------------------------------------------- 1 | ["\u0000"] -------------------------------------------------------------------------------- /test/nst/y_string_one-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u002c"] -------------------------------------------------------------------------------- /test/nst/y_string_simple_ascii.json: -------------------------------------------------------------------------------- 1 | ["asd "] -------------------------------------------------------------------------------- /test/nst/y_string_space.json: -------------------------------------------------------------------------------- 1 | " " -------------------------------------------------------------------------------- /test/nst/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json: -------------------------------------------------------------------------------- 1 | ["\uD834\uDd1e"] -------------------------------------------------------------------------------- /test/nst/y_string_three-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0821"] -------------------------------------------------------------------------------- /test/nst/y_string_two-byte-utf-8.json: -------------------------------------------------------------------------------- 1 | ["\u0123"] -------------------------------------------------------------------------------- /test/nst/y_string_uEscape.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/nst/y_string_uEscape.json -------------------------------------------------------------------------------- /test/nst/y_string_uescaped_newline.json: -------------------------------------------------------------------------------- 1 | ["new\u000Aline"] -------------------------------------------------------------------------------- /test/nst/y_string_unescaped_char_delete.json: -------------------------------------------------------------------------------- 1 | [""] -------------------------------------------------------------------------------- /test/nst/y_string_unicode.json: -------------------------------------------------------------------------------- 1 | ["\uA66D"] -------------------------------------------------------------------------------- /test/nst/y_string_unicodeEscapedBackslash.json: -------------------------------------------------------------------------------- 1 | ["\u005C"] -------------------------------------------------------------------------------- /test/nst/y_string_unicode_U+10FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uDBFF\uDFFE"] -------------------------------------------------------------------------------- /test/nst/y_string_unicode_U+1FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uD83F\uDFFE"] -------------------------------------------------------------------------------- /test/nst/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json: -------------------------------------------------------------------------------- 1 | ["\u200B"] -------------------------------------------------------------------------------- /test/nst/y_string_unicode_U+2064_invisible_plus.json: -------------------------------------------------------------------------------- 1 | ["\u2064"] -------------------------------------------------------------------------------- /test/nst/y_string_unicode_U+FDD0_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uFDD0"] -------------------------------------------------------------------------------- /test/nst/y_string_unicode_U+FFFE_nonchar.json: -------------------------------------------------------------------------------- 1 | ["\uFFFE"] -------------------------------------------------------------------------------- /test/nst/y_string_unicode_escaped_double_quote.json: -------------------------------------------------------------------------------- 1 | ["\u0022"] -------------------------------------------------------------------------------- /test/nst/y_string_with_del_character.json: -------------------------------------------------------------------------------- 1 | ["aa"] -------------------------------------------------------------------------------- /test/nst/y_structure_lonely_false.json: -------------------------------------------------------------------------------- 1 | false -------------------------------------------------------------------------------- /test/nst/y_structure_lonely_int.json: -------------------------------------------------------------------------------- 1 | 42 -------------------------------------------------------------------------------- /test/nst/y_structure_lonely_negative_real.json: -------------------------------------------------------------------------------- 1 | -0.1 -------------------------------------------------------------------------------- /test/nst/y_structure_lonely_null.json: -------------------------------------------------------------------------------- 1 | null -------------------------------------------------------------------------------- /test/nst/y_structure_lonely_string.json: -------------------------------------------------------------------------------- 1 | "asd" -------------------------------------------------------------------------------- /test/nst/y_structure_lonely_true.json: -------------------------------------------------------------------------------- 1 | true -------------------------------------------------------------------------------- /test/nst/y_structure_string_empty.json: -------------------------------------------------------------------------------- 1 | "" -------------------------------------------------------------------------------- /test/nst/y_structure_trailing_newline.json: -------------------------------------------------------------------------------- 1 | ["a"] 2 | -------------------------------------------------------------------------------- /test/nst/y_structure_true_in_array.json: -------------------------------------------------------------------------------- 1 | [true] -------------------------------------------------------------------------------- /test/nst/y_structure_whitespace_array.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /test/parser_test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RyanMarcus/dirty-json/HEAD/test/parser_test.js --------------------------------------------------------------------------------