diff --git a/deno.json b/deno.json index 2a40690ed7f5..cecd2a644858 100644 --- a/deno.json +++ b/deno.json @@ -11,7 +11,7 @@ "crypto/_wasm/target", "encoding/varint/_wasm/target", "cov", - "encoding/testdata/jsonc", + "jsonc/testdata", "encoding/front_matter/testdata", "wasi/testdata" ] @@ -24,7 +24,7 @@ ".git", "crypto/_wasm/target", "encoding/varint/_wasm/target", - "encoding/testdata/jsonc", + "jsonc/testdata", "encoding/front_matter/testdata", "cov", "wasi/testdata" diff --git a/encoding/jsonc.ts b/encoding/jsonc.ts index 3b5cdc681e99..133c856a5647 100644 --- a/encoding/jsonc.ts +++ b/encoding/jsonc.ts @@ -1,6 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -/** {@linkcode parse} function for parsing +/** + * @deprecated (will be removed after 0.182.0) Import from `std/jsonc` instead. + * + * {@linkcode parse} function for parsing * [JSONC](https://code.visualstudio.com/docs/languages/json#_json-with-comments) * (JSON with Comments) strings. * @@ -9,390 +12,34 @@ * @module */ -import { assert } from "../_util/asserts.ts"; - -export interface ParseOptions { - /** Allow trailing commas at the end of arrays and objects. +export { + /** + * @deprecated (will be removed after 0.182.0) Import from `std/jsonc/parse.ts` instead. * - * @default {true} + * Valid types as a result of JSON parsing. */ - allowTrailingComma?: boolean; -} - -/** - * Converts a JSON with Comments (JSONC) string into an object. - * If a syntax error is found, throw a SyntaxError. - * - * @example - * - * ```ts - * import * as JSONC from "https://deno.land/std@$STD_VERSION/encoding/jsonc.ts"; - * - * console.log(JSONC.parse('{"foo": "bar", } // comment')); //=> { foo: "bar" } - * console.log(JSONC.parse('{"foo": "bar", } /* comment *\/')); //=> { foo: "bar" } - * console.log(JSONC.parse('{"foo": "bar" } // comment', { - * allowTrailingComma: false, - * })); //=> { foo: "bar" } - * ``` - * - * @param text A valid JSONC string. - */ -export function parse( - text: string, - { allowTrailingComma = true }: ParseOptions = {}, -) { - if (new.target) { - throw new TypeError("parse is not a constructor"); - } - return new JSONCParser(text, { allowTrailingComma }).parse() as JSONValue; -} - -/** Valid types as a result of JSON parsing */ -export type JSONValue = - | { [key: string]: JSONValue | undefined } - | JSONValue[] - | string - | number - | boolean - | null; - -enum tokenType { - beginObject, - endObject, - beginArray, - endArray, - nameSeparator, - valueSeparator, - nullOrTrueOrFalseOrNumber, - string, -} - -type Token = { - type: Exclude< - tokenType, - tokenType.string | tokenType.nullOrTrueOrFalseOrNumber - >; - sourceText?: undefined; - position: number; -} | { - type: tokenType.string; - sourceText: string; - position: number; -} | { - type: tokenType.nullOrTrueOrFalseOrNumber; - sourceText: string; - position: number; -}; - -const originalJSONParse = globalThis.JSON.parse; - -// First tokenize and then parse the token. -class JSONCParser { - readonly #whitespace = new Set(" \t\r\n"); - readonly #numberEndToken = new Set([..."[]{}:,/", ...this.#whitespace]); - #text: string; - #length: number; - #tokenized: Generator; - #options: ParseOptions; - constructor(text: string, options: ParseOptions) { - this.#text = `${text}`; - this.#length = this.#text.length; - this.#tokenized = this.#tokenize(); - this.#options = options; - } - parse() { - const token = this.#getNext(); - const res = this.#parseJSONValue(token); - - // make sure all characters have been read - const { done, value } = this.#tokenized.next(); - if (!done) { - throw new SyntaxError(buildErrorMessage(value)); - } - - return res; - } - /** Read the next token. If the token is read to the end, it throws a SyntaxError. */ - #getNext() { - const { done, value } = this.#tokenized.next(); - if (done) { - throw new SyntaxError("Unexpected end of JSONC input"); - } - return value; - } - /** Split the JSONC string into token units. Whitespace and comments are skipped. */ - *#tokenize(): Generator { - for (let i = 0; i < this.#length; i++) { - // skip whitespace - if (this.#whitespace.has(this.#text[i])) { - continue; - } - - // skip multi line comment (`/*...*/`) - if (this.#text[i] === "/" && this.#text[i + 1] === "*") { - i += 2; - let hasEndOfComment = false; - for (; i < this.#length; i++) { // read until find `*/` - if (this.#text[i] === "*" && this.#text[i + 1] === "/") { - hasEndOfComment = true; - break; - } - } - if (!hasEndOfComment) { - throw new SyntaxError("Unexpected end of JSONC input"); - } - i++; - continue; - } - - // skip single line comment (`//...`) - if (this.#text[i] === "/" && this.#text[i + 1] === "/") { - i += 2; - for (; i < this.#length; i++) { // read until find `\n` or `\r` - if (this.#text[i] === "\n" || this.#text[i] === "\r") { - break; - } - } - continue; - } - - switch (this.#text[i]) { - case "{": - yield { type: tokenType.beginObject, position: i } as const; - break; - case "}": - yield { type: tokenType.endObject, position: i } as const; - break; - case "[": - yield { type: tokenType.beginArray, position: i } as const; - break; - case "]": - yield { type: tokenType.endArray, position: i } as const; - break; - case ":": - yield { type: tokenType.nameSeparator, position: i } as const; - break; - case ",": - yield { type: tokenType.valueSeparator, position: i } as const; - break; - case '"': { // parse string token - const startIndex = i; - // Need to handle consecutive backslashes correctly - // '"\\""' => '"' - // '"\\\\"' => '\\' - // '"\\\\\\""' => '\\"' - // '"\\\\\\\\"' => '\\\\' - let shouldEscapeNext = false; - i++; - for (; i < this.#length; i++) { // read until find `"` - if (this.#text[i] === '"' && !shouldEscapeNext) { - break; - } - shouldEscapeNext = this.#text[i] === "\\" && !shouldEscapeNext; - } - yield { - type: tokenType.string, - sourceText: this.#text.substring(startIndex, i + 1), - position: startIndex, - } as const; - break; - } - default: { // parse null, true, false or number token - const startIndex = i; - for (; i < this.#length; i++) { // read until find numberEndToken - if (this.#numberEndToken.has(this.#text[i])) { - break; - } - } - i--; - yield { - type: tokenType.nullOrTrueOrFalseOrNumber, - sourceText: this.#text.substring(startIndex, i + 1), - position: startIndex, - } as const; - } - } - } - } - #parseJSONValue(value: Token) { - switch (value.type) { - case tokenType.beginObject: - return this.#parseObject(); - case tokenType.beginArray: - return this.#parseArray(); - case tokenType.nullOrTrueOrFalseOrNumber: - return this.#parseNullOrTrueOrFalseOrNumber(value); - case tokenType.string: - return this.#parseString(value); - default: - throw new SyntaxError(buildErrorMessage(value)); - } - } - #parseObject() { - const target: Record = {}; - // ┌─token1 - // { } - // ┌─────────────token1 - // │ ┌─────────token2 - // │ │ ┌─────token3 - // │ │ │ ┌─token4 - // { "key" : value } - // ┌───────────────token1 - // │ ┌───────────token2 - // │ │ ┌───────token3 - // │ │ │ ┌───token4 - // │ │ │ │ ┌─token1 - // { "key" : value , } - // ┌─────────────────────────────token1 - // │ ┌─────────────────────────token2 - // │ │ ┌─────────────────────token3 - // │ │ │ ┌─────────────────token4 - // │ │ │ │ ┌─────────────token1 - // │ │ │ │ │ ┌─────────token2 - // │ │ │ │ │ │ ┌─────token3 - // │ │ │ │ │ │ │ ┌─token4 - // { "key" : value , "key" : value } - for (let isFirst = true;; isFirst = false) { - const token1 = this.#getNext(); - if ( - (isFirst || this.#options.allowTrailingComma) && - token1.type === tokenType.endObject - ) { - return target; - } - if (token1.type !== tokenType.string) { - throw new SyntaxError(buildErrorMessage(token1)); - } - const key = this.#parseString(token1); - - const token2 = this.#getNext(); - if (token2.type !== tokenType.nameSeparator) { - throw new SyntaxError(buildErrorMessage(token2)); - } - - const token3 = this.#getNext(); - Object.defineProperty(target, key, { - value: this.#parseJSONValue(token3), - writable: true, - enumerable: true, - configurable: true, - }); - - const token4 = this.#getNext(); - if (token4.type === tokenType.endObject) { - return target; - } - if (token4.type !== tokenType.valueSeparator) { - throw new SyntaxError(buildErrorMessage(token4)); - } - } - } - #parseArray() { - const target: unknown[] = []; - // ┌─token1 - // [ ] - // ┌─────────────token1 - // │ ┌─────────token2 - // [ value ] - // ┌───────token1 - // │ ┌───token2 - // │ │ ┌─token1 - // [ value , ] - // ┌─────────────token1 - // │ ┌─────────token2 - // │ │ ┌─────token1 - // │ │ │ ┌─token2 - // [ value , value ] - for (let isFirst = true;; isFirst = false) { - const token1 = this.#getNext(); - if ( - (isFirst || this.#options.allowTrailingComma) && - token1.type === tokenType.endArray - ) { - return target; - } - target.push(this.#parseJSONValue(token1)); - - const token2 = this.#getNext(); - if (token2.type === tokenType.endArray) { - return target; - } - if (token2.type !== tokenType.valueSeparator) { - throw new SyntaxError(buildErrorMessage(token2)); - } - } - } - #parseString(value: { - type: tokenType.string; - sourceText: string; - position: number; - }): string { - let parsed; - try { - // Use JSON.parse to handle `\u0000` etc. correctly. - parsed = originalJSONParse(value.sourceText); - } catch { - throw new SyntaxError(buildErrorMessage(value)); - } - assert(typeof parsed === "string"); - return parsed; - } - #parseNullOrTrueOrFalseOrNumber(value: { - type: tokenType.nullOrTrueOrFalseOrNumber; - sourceText: string; - position: number; - }) { - if (value.sourceText === "null") { - return null; - } - if (value.sourceText === "true") { - return true; - } - if (value.sourceText === "false") { - return false; - } - let parsed; - try { - // Use JSON.parse to handle `+100`, `Infinity` etc. correctly. - parsed = originalJSONParse(value.sourceText); - } catch { - throw new SyntaxError(buildErrorMessage(value)); - } - assert(typeof parsed === "number"); - return parsed; - } -} - -function buildErrorMessage({ type, sourceText, position }: Token) { - let token = ""; - switch (type) { - case tokenType.beginObject: - token = "{"; - break; - case tokenType.endObject: - token = "}"; - break; - case tokenType.beginArray: - token = "["; - break; - case tokenType.endArray: - token = "]"; - break; - case tokenType.nameSeparator: - token = ":"; - break; - case tokenType.valueSeparator: - token = ","; - break; - case tokenType.nullOrTrueOrFalseOrNumber: - case tokenType.string: - // Truncate the string so that it is within 30 lengths. - token = 30 < sourceText.length - ? `${sourceText.slice(0, 30)}...` - : sourceText; - break; - default: - throw new Error("unreachable"); - } - return `Unexpected token ${token} in JSONC at position ${position}`; -} + type JSONValue, + /** + * @deprecated (will be removed after 0.182.0) Import from `std/jsonc/parse.ts` instead. + * + * Converts a JSON with Comments (JSONC) string into an object. + * If a syntax error is found, throw a SyntaxError. + * + * @example + * + * ```ts + * import * as JSONC from "https://deno.land/std@$STD_VERSION/jsonc/mod.ts"; + * + * console.log(JSONC.parse('{"foo": "bar", } // comment')); //=> { foo: "bar" } + * console.log(JSONC.parse('{"foo": "bar", } /* comment *\/')); //=> { foo: "bar" } + * console.log(JSONC.parse('{"foo": "bar" } // comment', { + * allowTrailingComma: false, + * })); //=> { foo: "bar" } + * ``` + * + * @param text A valid JSONC string. + */ + parse, + /** @deprecated (will be removed after 0.182.0) Import from `std/jsonc/parse.ts` instead. */ + type ParseOptions, +} from "../jsonc/mod.ts"; diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_double_huge_neg_exp.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_double_huge_neg_exp.json deleted file mode 100644 index ae4c7b71f620..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_double_huge_neg_exp.json +++ /dev/null @@ -1 +0,0 @@ -[123.456e-789] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_pos_double_huge_exp.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_pos_double_huge_exp.json deleted file mode 100644 index e10a7eb62a55..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_pos_double_huge_exp.json +++ /dev/null @@ -1 +0,0 @@ -[1.5e+9999] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_too_big_neg_int.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_too_big_neg_int.json deleted file mode 100644 index dfa384619749..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_too_big_neg_int.json +++ /dev/null @@ -1 +0,0 @@ -[-123123123123123123123123123123] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_too_big_pos_int.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_too_big_pos_int.json deleted file mode 100644 index 338a8c3c0be7..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_too_big_pos_int.json +++ /dev/null @@ -1 +0,0 @@ -[100000000000000000000] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_UTF-16LE_with_BOM.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_UTF-16LE_with_BOM.json deleted file mode 100644 index 2a79c0629a49..000000000000 Binary files a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_UTF-16LE_with_BOM.json and /dev/null differ diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_1_true_without_comma.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_1_true_without_comma.json deleted file mode 100644 index c14e3f6b1e9d..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_1_true_without_comma.json +++ /dev/null @@ -1 +0,0 @@ -[1 true] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_extra_comma.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_extra_comma.json deleted file mode 100644 index 5f8ce18e4b2a..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_extra_comma.json +++ /dev/null @@ -1 +0,0 @@ -["",] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_number_and_comma.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_number_and_comma.json deleted file mode 100644 index 13f6f1d18a44..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_number_and_comma.json +++ /dev/null @@ -1 +0,0 @@ -[1,] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-01.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-01.json deleted file mode 100644 index 0df32bac8076..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-01.json +++ /dev/null @@ -1 +0,0 @@ -[-01] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_neg_int_starting_with_zero.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_neg_int_starting_with_zero.json deleted file mode 100644 index 67af0960af79..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_neg_int_starting_with_zero.json +++ /dev/null @@ -1 +0,0 @@ -[-012] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_with_leading_zero.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_with_leading_zero.json deleted file mode 100644 index 7106da1f3b85..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_with_leading_zero.json +++ /dev/null @@ -1 +0,0 @@ -[012] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_key_with_single_quotes.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_key_with_single_quotes.json deleted file mode 100644 index 77c32759962b..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_key_with_single_quotes.json +++ /dev/null @@ -1 +0,0 @@ -{key: 'value'} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_non_string_key.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_non_string_key.json deleted file mode 100644 index b9945b34b449..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_non_string_key.json +++ /dev/null @@ -1 +0,0 @@ -{1:1} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comma.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comma.json deleted file mode 100644 index a4b02509459f..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comma.json +++ /dev/null @@ -1 +0,0 @@ -{"id":0,} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open.json deleted file mode 100644 index e335136c0796..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open.json +++ /dev/null @@ -1 +0,0 @@ -{"a":"b"}// \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_unquoted_key.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_unquoted_key.json deleted file mode 100644 index 8ba137293c3a..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_unquoted_key.json +++ /dev/null @@ -1 +0,0 @@ -{a: "b"} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_single_space.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_single_space.json deleted file mode 100644 index 0519ecba6ea9..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_single_space.json +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unescaped_ctrl_char.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unescaped_ctrl_char.json deleted file mode 100644 index 9f21348071d3..000000000000 Binary files a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unescaped_ctrl_char.json and /dev/null differ diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unescaped_tab.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unescaped_tab.json deleted file mode 100644 index 160264a2d995..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unescaped_tab.json +++ /dev/null @@ -1 +0,0 @@ -[" "] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_with_comment.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_with_comment.json deleted file mode 100644 index ed1b569b7049..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_with_comment.json +++ /dev/null @@ -1 +0,0 @@ -{"a":/*comment*/"b"} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_whitespace_formfeed.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_whitespace_formfeed.json deleted file mode 100644 index a9ea535d1bbe..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_whitespace_formfeed.json +++ /dev/null @@ -1 +0,0 @@ -[ ] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_empty-string.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_empty-string.json deleted file mode 100644 index 93b6be2bccad..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_empty-string.json +++ /dev/null @@ -1 +0,0 @@ -[""] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_empty.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_empty.json deleted file mode 100644 index 0637a088a01e..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_empty.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_ending_with_newline.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_ending_with_newline.json deleted file mode 100644 index eac5f7b46e04..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_ending_with_newline.json +++ /dev/null @@ -1 +0,0 @@ -["a"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_null.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_null.json deleted file mode 100644 index 500db4a86aa3..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_null.json +++ /dev/null @@ -1 +0,0 @@ -[null] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_1_and_newline.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_1_and_newline.json deleted file mode 100644 index 994825500ae3..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_1_and_newline.json +++ /dev/null @@ -1,2 +0,0 @@ -[1 -] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_leading_space.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_leading_space.json deleted file mode 100644 index 18bfe6422c78..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_leading_space.json +++ /dev/null @@ -1 +0,0 @@ - [1] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_0e+1.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_0e+1.json deleted file mode 100644 index d1d3967065cf..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_0e+1.json +++ /dev/null @@ -1 +0,0 @@ -[0e+1] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_after_space.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_after_space.json deleted file mode 100644 index 623570d96040..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_after_space.json +++ /dev/null @@ -1 +0,0 @@ -[ 4] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_minus_zero.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_minus_zero.json deleted file mode 100644 index 37af1312ab5d..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_minus_zero.json +++ /dev/null @@ -1 +0,0 @@ -[-0] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_int.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_int.json deleted file mode 100644 index 8e30f8bd9660..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_int.json +++ /dev/null @@ -1 +0,0 @@ -[-123] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_one.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_one.json deleted file mode 100644 index 99d21a2a0f09..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_one.json +++ /dev/null @@ -1 +0,0 @@ -[-1] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_zero.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_zero.json deleted file mode 100644 index 37af1312ab5d..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_negative_zero.json +++ /dev/null @@ -1 +0,0 @@ -[-0] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_capital_e_neg_exp.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_capital_e_neg_exp.json deleted file mode 100644 index 0a01bd3ef4ca..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_capital_e_neg_exp.json +++ /dev/null @@ -1 +0,0 @@ -[1E-2] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_capital_e_pos_exp.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_capital_e_pos_exp.json deleted file mode 100644 index 5a8fc0972425..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_capital_e_pos_exp.json +++ /dev/null @@ -1 +0,0 @@ -[1E+2] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_simple_real.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_simple_real.json deleted file mode 100644 index b02878e5fc19..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_simple_real.json +++ /dev/null @@ -1 +0,0 @@ -[123.456789] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object.json deleted file mode 100644 index 78262eda3fa9..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object.json +++ /dev/null @@ -1 +0,0 @@ -{"asd":"sdf", "dfg":"fgh"} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_duplicated_key_and_value.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_duplicated_key_and_value.json deleted file mode 100644 index 211581c20717..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_duplicated_key_and_value.json +++ /dev/null @@ -1 +0,0 @@ -{"a":"b","a":"b"} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_empty.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_empty.json deleted file mode 100644 index 9e26dfeeb6e6..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_empty.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_extreme_numbers.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_extreme_numbers.json deleted file mode 100644 index a0d3531c32f9..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_extreme_numbers.json +++ /dev/null @@ -1 +0,0 @@ -{ "min": -1.0e+28, "max": 1.0e+28 } \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_long_strings.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_long_strings.json deleted file mode 100644 index bdc4a08719ef..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_long_strings.json +++ /dev/null @@ -1 +0,0 @@ -{"x":[{"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}], "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_simple.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_simple.json deleted file mode 100644 index dacac917fb7b..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_simple.json +++ /dev/null @@ -1 +0,0 @@ -{"a":[]} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_string_unicode.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_string_unicode.json deleted file mode 100644 index 8effdb297c78..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_string_unicode.json +++ /dev/null @@ -1 +0,0 @@ -{"title":"\u041f\u043e\u043b\u0442\u043e\u0440\u0430 \u0417\u0435\u043c\u043b\u0435\u043a\u043e\u043f\u0430" } \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_with_newlines.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_with_newlines.json deleted file mode 100644 index 246ec6b34d5e..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_with_newlines.json +++ /dev/null @@ -1,3 +0,0 @@ -{ -"a": "b" -} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_1_2_3_bytes_UTF-8_sequences.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_1_2_3_bytes_UTF-8_sequences.json deleted file mode 100644 index 9967ddeb8b11..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_1_2_3_bytes_UTF-8_sequences.json +++ /dev/null @@ -1 +0,0 @@ -["\u0060\u012a\u12AB"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_allowed_escapes.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_allowed_escapes.json deleted file mode 100644 index 7f495532fb37..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_allowed_escapes.json +++ /dev/null @@ -1 +0,0 @@ -["\"\\\/\b\f\n\r\t"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_backslash_and_u_escaped_zero.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_backslash_and_u_escaped_zero.json deleted file mode 100644 index d4439eda73ac..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_backslash_and_u_escaped_zero.json +++ /dev/null @@ -1 +0,0 @@ -["\\u0000"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_backslash_doublequotes.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_backslash_doublequotes.json deleted file mode 100644 index ae03243b6742..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_backslash_doublequotes.json +++ /dev/null @@ -1 +0,0 @@ -["\""] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_comments.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_comments.json deleted file mode 100644 index 2260c20c2f86..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_comments.json +++ /dev/null @@ -1 +0,0 @@ -["a/*b*/c/*d//e"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_double_escape_a.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_double_escape_a.json deleted file mode 100644 index 6715d6f4049f..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_double_escape_a.json +++ /dev/null @@ -1 +0,0 @@ -["\\a"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_escaped_control_character.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_escaped_control_character.json deleted file mode 100644 index 5b014a9c25b5..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_escaped_control_character.json +++ /dev/null @@ -1 +0,0 @@ -["\u0012"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_escaped_noncharacter.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_escaped_noncharacter.json deleted file mode 100644 index 2ff52e2c50bc..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_escaped_noncharacter.json +++ /dev/null @@ -1 +0,0 @@ -["\uFFFF"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_null_escape.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_null_escape.json deleted file mode 100644 index c1ad844043e6..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_null_escape.json +++ /dev/null @@ -1 +0,0 @@ -["\u0000"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_pi.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_pi.json deleted file mode 100644 index 9df11ae88bde..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_pi.json +++ /dev/null @@ -1 +0,0 @@ -["π"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_simple_ascii.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_simple_ascii.json deleted file mode 100644 index 8cadf7d051df..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_simple_ascii.json +++ /dev/null @@ -1 +0,0 @@ -["asd "] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_space.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_space.json deleted file mode 100644 index efd782cc3250..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_space.json +++ /dev/null @@ -1 +0,0 @@ -" " \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_three-byte-utf-8.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_three-byte-utf-8.json deleted file mode 100644 index 108f1d67dffc..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_three-byte-utf-8.json +++ /dev/null @@ -1 +0,0 @@ -["\u0821"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_two-byte-utf-8.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_two-byte-utf-8.json deleted file mode 100644 index 461503c31001..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_two-byte-utf-8.json +++ /dev/null @@ -1 +0,0 @@ -["\u0123"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_u+2028_line_sep.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_u+2028_line_sep.json deleted file mode 100644 index 897b6021af72..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_u+2028_line_sep.json +++ /dev/null @@ -1 +0,0 @@ -["
"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_uEscape.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_uEscape.json deleted file mode 100644 index f7b41a02fa5e..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_uEscape.json +++ /dev/null @@ -1 +0,0 @@ -["\u0061\u30af\u30EA\u30b9"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_uescaped_newline.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_uescaped_newline.json deleted file mode 100644 index 3a5a220b69cc..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_uescaped_newline.json +++ /dev/null @@ -1 +0,0 @@ -["new\u000Aline"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unescaped_char_delete.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unescaped_char_delete.json deleted file mode 100644 index 7d064f498715..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unescaped_char_delete.json +++ /dev/null @@ -1 +0,0 @@ -[""] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode.json deleted file mode 100644 index 3598095b79be..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode.json +++ /dev/null @@ -1 +0,0 @@ -["\uA66D"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicodeEscapedBackslash.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicodeEscapedBackslash.json deleted file mode 100644 index 0bb3b51e7eae..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicodeEscapedBackslash.json +++ /dev/null @@ -1 +0,0 @@ -["\u005C"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json deleted file mode 100644 index 626d5f81572d..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json +++ /dev/null @@ -1 +0,0 @@ -["\u200B"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+2064_invisible_plus.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+2064_invisible_plus.json deleted file mode 100644 index 1e23972c65e3..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+2064_invisible_plus.json +++ /dev/null @@ -1 +0,0 @@ -["\u2064"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_escaped_double_quote.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_escaped_double_quote.json deleted file mode 100644 index 4e6257856dd2..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_escaped_double_quote.json +++ /dev/null @@ -1 +0,0 @@ -["\u0022"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_utf8.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_utf8.json deleted file mode 100644 index 40878435f978..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_utf8.json +++ /dev/null @@ -1 +0,0 @@ -["€𝄞"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_false.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_false.json deleted file mode 100644 index 02e4a84d62c4..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_false.json +++ /dev/null @@ -1 +0,0 @@ -false \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_int.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_int.json deleted file mode 100644 index f70d7bba4ae1..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_int.json +++ /dev/null @@ -1 +0,0 @@ -42 \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_negative_real.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_negative_real.json deleted file mode 100644 index b5135a207dee..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_negative_real.json +++ /dev/null @@ -1 +0,0 @@ --0.1 \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_null.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_null.json deleted file mode 100644 index ec747fa47ddb..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_null.json +++ /dev/null @@ -1 +0,0 @@ -null \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_string.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_string.json deleted file mode 100644 index b6e982ca96aa..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_string.json +++ /dev/null @@ -1 +0,0 @@ -"asd" \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_true.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_true.json deleted file mode 100644 index f32a5804e292..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_lonely_true.json +++ /dev/null @@ -1 +0,0 @@ -true \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_string_empty.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_string_empty.json deleted file mode 100644 index 3cc762b5501e..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_string_empty.json +++ /dev/null @@ -1 +0,0 @@ -"" \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_true_in_array.json b/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_true_in_array.json deleted file mode 100644 index de601e305f4f..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_true_in_array.json +++ /dev/null @@ -1 +0,0 @@ -[true] \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_key_nfc_nfd.json b/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_key_nfc_nfd.json deleted file mode 100644 index e4cbc1dc114d..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_key_nfc_nfd.json +++ /dev/null @@ -1 +0,0 @@ -{"é":"NFC","é":"NFD"} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_key_nfd_nfc.json b/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_key_nfd_nfc.json deleted file mode 100644 index b04ece18df70..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_key_nfd_nfc.json +++ /dev/null @@ -1 +0,0 @@ -{"é":"NFD","é":"NFC"} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_different_values.json b/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_different_values.json deleted file mode 100644 index 0c4547df378b..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_different_values.json +++ /dev/null @@ -1 +0,0 @@ -{"a":1,"a":2} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_same_value.json b/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_same_value.json deleted file mode 100644 index e1070184de79..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_same_value.json +++ /dev/null @@ -1 +0,0 @@ -{"a":1,"a":1} \ No newline at end of file diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_unclear_values.json b/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_unclear_values.json deleted file mode 100644 index 8a76bd4ffeee..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_transform/object_same_key_unclear_values.json +++ /dev/null @@ -1 +0,0 @@ -{"a":0, "a":-0} diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_with_escaped_NULL.json b/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_with_escaped_NULL.json deleted file mode 100644 index 8ca2be59e602..000000000000 --- a/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_with_escaped_NULL.json +++ /dev/null @@ -1 +0,0 @@ -["A\u0000B"] \ No newline at end of file diff --git a/encoding/testdata/jsonc/test262/isConstructor.js b/encoding/testdata/jsonc/test262/isConstructor.js deleted file mode 100644 index 41b5343372bb..000000000000 --- a/encoding/testdata/jsonc/test262/isConstructor.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -// Ported from test262 -// https://github.com/tc39/test262/blob/488eb365db7c613d52e72a9f5b8726684906e540/harness/isConstructor.js -// Copyright (C) 2017 André Bargull. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -description: | - Test if a given function is a constructor function. -defines: [isConstructor] ----*/ - -function isConstructor(f) { - try { - Reflect.construct(function(){}, [], f); - } catch (e) { - return false; - } - return true; -} diff --git a/jsonc/mod.ts b/jsonc/mod.ts new file mode 100644 index 000000000000..618557b3fe40 --- /dev/null +++ b/jsonc/mod.ts @@ -0,0 +1,2 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +export * from "./parse.ts"; diff --git a/jsonc/parse.ts b/jsonc/parse.ts new file mode 100644 index 000000000000..628cfb0612e1 --- /dev/null +++ b/jsonc/parse.ts @@ -0,0 +1,398 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + +/** {@linkcode parse} function for parsing + * [JSONC](https://code.visualstudio.com/docs/languages/json#_json-with-comments) + * (JSON with Comments) strings. + * + * This module is browser compatible. + * + * @module + */ + +import { assert } from "../_util/asserts.ts"; + +export interface ParseOptions { + /** Allow trailing commas at the end of arrays and objects. + * + * @default {true} + */ + allowTrailingComma?: boolean; +} + +/** + * Converts a JSON with Comments (JSONC) string into an object. + * If a syntax error is found, throw a SyntaxError. + * + * @example + * + * ```ts + * import * as JSONC from "https://deno.land/std@$STD_VERSION/jsonc/mod.ts"; + * + * console.log(JSONC.parse('{"foo": "bar", } // comment')); //=> { foo: "bar" } + * console.log(JSONC.parse('{"foo": "bar", } /* comment *\/')); //=> { foo: "bar" } + * console.log(JSONC.parse('{"foo": "bar" } // comment', { + * allowTrailingComma: false, + * })); //=> { foo: "bar" } + * ``` + * + * @param text A valid JSONC string. + */ +export function parse( + text: string, + { allowTrailingComma = true }: ParseOptions = {}, +) { + if (new.target) { + throw new TypeError("parse is not a constructor"); + } + return new JSONCParser(text, { allowTrailingComma }).parse() as JSONValue; +} + +/** Valid types as a result of JSON parsing */ +export type JSONValue = + | { [key: string]: JSONValue | undefined } + | JSONValue[] + | string + | number + | boolean + | null; + +enum tokenType { + beginObject, + endObject, + beginArray, + endArray, + nameSeparator, + valueSeparator, + nullOrTrueOrFalseOrNumber, + string, +} + +type Token = { + type: Exclude< + tokenType, + tokenType.string | tokenType.nullOrTrueOrFalseOrNumber + >; + sourceText?: undefined; + position: number; +} | { + type: tokenType.string; + sourceText: string; + position: number; +} | { + type: tokenType.nullOrTrueOrFalseOrNumber; + sourceText: string; + position: number; +}; + +const originalJSONParse = globalThis.JSON.parse; + +// First tokenize and then parse the token. +class JSONCParser { + readonly #whitespace = new Set(" \t\r\n"); + readonly #numberEndToken = new Set([..."[]{}:,/", ...this.#whitespace]); + #text: string; + #length: number; + #tokenized: Generator; + #options: ParseOptions; + constructor(text: string, options: ParseOptions) { + this.#text = `${text}`; + this.#length = this.#text.length; + this.#tokenized = this.#tokenize(); + this.#options = options; + } + parse() { + const token = this.#getNext(); + const res = this.#parseJSONValue(token); + + // make sure all characters have been read + const { done, value } = this.#tokenized.next(); + if (!done) { + throw new SyntaxError(buildErrorMessage(value)); + } + + return res; + } + /** Read the next token. If the token is read to the end, it throws a SyntaxError. */ + #getNext() { + const { done, value } = this.#tokenized.next(); + if (done) { + throw new SyntaxError("Unexpected end of JSONC input"); + } + return value; + } + /** Split the JSONC string into token units. Whitespace and comments are skipped. */ + *#tokenize(): Generator { + for (let i = 0; i < this.#length; i++) { + // skip whitespace + if (this.#whitespace.has(this.#text[i])) { + continue; + } + + // skip multi line comment (`/*...*/`) + if (this.#text[i] === "/" && this.#text[i + 1] === "*") { + i += 2; + let hasEndOfComment = false; + for (; i < this.#length; i++) { // read until find `*/` + if (this.#text[i] === "*" && this.#text[i + 1] === "/") { + hasEndOfComment = true; + break; + } + } + if (!hasEndOfComment) { + throw new SyntaxError("Unexpected end of JSONC input"); + } + i++; + continue; + } + + // skip single line comment (`//...`) + if (this.#text[i] === "/" && this.#text[i + 1] === "/") { + i += 2; + for (; i < this.#length; i++) { // read until find `\n` or `\r` + if (this.#text[i] === "\n" || this.#text[i] === "\r") { + break; + } + } + continue; + } + + switch (this.#text[i]) { + case "{": + yield { type: tokenType.beginObject, position: i } as const; + break; + case "}": + yield { type: tokenType.endObject, position: i } as const; + break; + case "[": + yield { type: tokenType.beginArray, position: i } as const; + break; + case "]": + yield { type: tokenType.endArray, position: i } as const; + break; + case ":": + yield { type: tokenType.nameSeparator, position: i } as const; + break; + case ",": + yield { type: tokenType.valueSeparator, position: i } as const; + break; + case '"': { // parse string token + const startIndex = i; + // Need to handle consecutive backslashes correctly + // '"\\""' => '"' + // '"\\\\"' => '\\' + // '"\\\\\\""' => '\\"' + // '"\\\\\\\\"' => '\\\\' + let shouldEscapeNext = false; + i++; + for (; i < this.#length; i++) { // read until find `"` + if (this.#text[i] === '"' && !shouldEscapeNext) { + break; + } + shouldEscapeNext = this.#text[i] === "\\" && !shouldEscapeNext; + } + yield { + type: tokenType.string, + sourceText: this.#text.substring(startIndex, i + 1), + position: startIndex, + } as const; + break; + } + default: { // parse null, true, false or number token + const startIndex = i; + for (; i < this.#length; i++) { // read until find numberEndToken + if (this.#numberEndToken.has(this.#text[i])) { + break; + } + } + i--; + yield { + type: tokenType.nullOrTrueOrFalseOrNumber, + sourceText: this.#text.substring(startIndex, i + 1), + position: startIndex, + } as const; + } + } + } + } + #parseJSONValue(value: Token) { + switch (value.type) { + case tokenType.beginObject: + return this.#parseObject(); + case tokenType.beginArray: + return this.#parseArray(); + case tokenType.nullOrTrueOrFalseOrNumber: + return this.#parseNullOrTrueOrFalseOrNumber(value); + case tokenType.string: + return this.#parseString(value); + default: + throw new SyntaxError(buildErrorMessage(value)); + } + } + #parseObject() { + const target: Record = {}; + // ┌─token1 + // { } + // ┌─────────────token1 + // │ ┌─────────token2 + // │ │ ┌─────token3 + // │ │ │ ┌─token4 + // { "key" : value } + // ┌───────────────token1 + // │ ┌───────────token2 + // │ │ ┌───────token3 + // │ │ │ ┌───token4 + // │ │ │ │ ┌─token1 + // { "key" : value , } + // ┌─────────────────────────────token1 + // │ ┌─────────────────────────token2 + // │ │ ┌─────────────────────token3 + // │ │ │ ┌─────────────────token4 + // │ │ │ │ ┌─────────────token1 + // │ │ │ │ │ ┌─────────token2 + // │ │ │ │ │ │ ┌─────token3 + // │ │ │ │ │ │ │ ┌─token4 + // { "key" : value , "key" : value } + for (let isFirst = true;; isFirst = false) { + const token1 = this.#getNext(); + if ( + (isFirst || this.#options.allowTrailingComma) && + token1.type === tokenType.endObject + ) { + return target; + } + if (token1.type !== tokenType.string) { + throw new SyntaxError(buildErrorMessage(token1)); + } + const key = this.#parseString(token1); + + const token2 = this.#getNext(); + if (token2.type !== tokenType.nameSeparator) { + throw new SyntaxError(buildErrorMessage(token2)); + } + + const token3 = this.#getNext(); + Object.defineProperty(target, key, { + value: this.#parseJSONValue(token3), + writable: true, + enumerable: true, + configurable: true, + }); + + const token4 = this.#getNext(); + if (token4.type === tokenType.endObject) { + return target; + } + if (token4.type !== tokenType.valueSeparator) { + throw new SyntaxError(buildErrorMessage(token4)); + } + } + } + #parseArray() { + const target: unknown[] = []; + // ┌─token1 + // [ ] + // ┌─────────────token1 + // │ ┌─────────token2 + // [ value ] + // ┌───────token1 + // │ ┌───token2 + // │ │ ┌─token1 + // [ value , ] + // ┌─────────────token1 + // │ ┌─────────token2 + // │ │ ┌─────token1 + // │ │ │ ┌─token2 + // [ value , value ] + for (let isFirst = true;; isFirst = false) { + const token1 = this.#getNext(); + if ( + (isFirst || this.#options.allowTrailingComma) && + token1.type === tokenType.endArray + ) { + return target; + } + target.push(this.#parseJSONValue(token1)); + + const token2 = this.#getNext(); + if (token2.type === tokenType.endArray) { + return target; + } + if (token2.type !== tokenType.valueSeparator) { + throw new SyntaxError(buildErrorMessage(token2)); + } + } + } + #parseString(value: { + type: tokenType.string; + sourceText: string; + position: number; + }): string { + let parsed; + try { + // Use JSON.parse to handle `\u0000` etc. correctly. + parsed = originalJSONParse(value.sourceText); + } catch { + throw new SyntaxError(buildErrorMessage(value)); + } + assert(typeof parsed === "string"); + return parsed; + } + #parseNullOrTrueOrFalseOrNumber(value: { + type: tokenType.nullOrTrueOrFalseOrNumber; + sourceText: string; + position: number; + }) { + if (value.sourceText === "null") { + return null; + } + if (value.sourceText === "true") { + return true; + } + if (value.sourceText === "false") { + return false; + } + let parsed; + try { + // Use JSON.parse to handle `+100`, `Infinity` etc. correctly. + parsed = originalJSONParse(value.sourceText); + } catch { + throw new SyntaxError(buildErrorMessage(value)); + } + assert(typeof parsed === "number"); + return parsed; + } +} + +function buildErrorMessage({ type, sourceText, position }: Token) { + let token = ""; + switch (type) { + case tokenType.beginObject: + token = "{"; + break; + case tokenType.endObject: + token = "}"; + break; + case tokenType.beginArray: + token = "["; + break; + case tokenType.endArray: + token = "]"; + break; + case tokenType.nameSeparator: + token = ":"; + break; + case tokenType.valueSeparator: + token = ","; + break; + case tokenType.nullOrTrueOrFalseOrNumber: + case tokenType.string: + // Truncate the string so that it is within 30 lengths. + token = 30 < sourceText.length + ? `${sourceText.slice(0, 30)}...` + : sourceText; + break; + default: + throw new Error("unreachable"); + } + return `Unexpected token ${token} in JSONC at position ${position}`; +} diff --git a/encoding/jsonc_test.ts b/jsonc/parse_test.ts similarity index 93% rename from encoding/jsonc_test.ts rename to jsonc/parse_test.ts index 9e880f3ba331..31cd4618230b 100644 --- a/encoding/jsonc_test.ts +++ b/jsonc/parse_test.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import * as JSONC from "./jsonc.ts"; +import { parse, type ParseOptions } from "./parse.ts"; import { assert, assertEquals, @@ -13,9 +13,9 @@ import { function assertValidParse( text: string, expected: unknown, - options?: JSONC.ParseOptions, + options?: ParseOptions, ) { - assertEquals(JSONC.parse(text, options), expected); + assertEquals(parse(text, options), expected); } function assertInvalidParse( @@ -23,10 +23,10 @@ function assertInvalidParse( // deno-lint-ignore no-explicit-any ErrorClass: new (...args: any[]) => Error, msgIncludes?: string, - options?: JSONC.ParseOptions, + options?: ParseOptions, ) { assertThrows( - () => JSONC.parse(text, options), + () => parse(text, options), ErrorClass, msgIncludes, ); @@ -119,7 +119,7 @@ Deno.test({ fn() { // The result of JSON.parse and the result of JSONC.parse should match const json = JSON.parse('{"__proto__": 100}'); - const jsonc = JSONC.parse('{"__proto__": 100}'); + const jsonc = parse('{"__proto__": 100}'); assertEquals(jsonc, json); assertEquals((jsonc as Record).__proto__, 100); assertEquals((jsonc as Record).__proto__, json.__proto__); @@ -136,7 +136,7 @@ Deno.test({ fn() { // The result of JSON.parse and the result of JSONC.parse should match const json = JSON.parse('{"aaa": 0, "aaa": 1}'); - const jsonc = JSONC.parse('{"aaa": 0, "aaa": 1}'); + const jsonc = parse('{"aaa": 0, "aaa": 1}'); assertEquals(jsonc, { aaa: 1 }); assertEquals(jsonc, json); }, @@ -188,7 +188,7 @@ Deno.test({ throw new Error("Don't try to set the value directly to the key __proto__.") } }); - import { parse } from "${import.meta.resolve("./jsonc.ts")}"; + import { parse } from "${import.meta.resolve("./parse.ts")}"; parse('{"__proto__": {"isAdmin": true}}'); `; const command = new Deno.Command(Deno.execPath(), { diff --git a/encoding/testdata/jsonc/JSONTestSuite/README.md b/jsonc/testdata/JSONTestSuite/README.md similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/README.md rename to jsonc/testdata/JSONTestSuite/README.md diff --git a/encoding/testdata/jsonc/JSONTestSuite/test.ts b/jsonc/testdata/JSONTestSuite/test.ts similarity index 88% rename from encoding/testdata/jsonc/JSONTestSuite/test.ts rename to jsonc/testdata/JSONTestSuite/test.ts index 4ca4002b20ad..229179ffe282 100644 --- a/encoding/testdata/jsonc/JSONTestSuite/test.ts +++ b/jsonc/testdata/JSONTestSuite/test.ts @@ -1,9 +1,9 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import * as JSONC from "../../../jsonc.ts"; -import { assertEquals } from "../../../../testing/asserts.ts"; -import { walk } from "../../../../fs/mod.ts"; -import { fromFileUrl } from "../../../../path/mod.ts"; +import * as JSONC from "../../parse.ts"; +import { assertEquals } from "../../../testing/asserts.ts"; +import { walk } from "../../../fs/mod.ts"; +import { fromFileUrl } from "../../../path/mod.ts"; function getError( fn: () => T, diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/i_number_double_huge_neg_exp.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_double_huge_neg_exp.json new file mode 100644 index 000000000000..d2b4505df5bd --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_double_huge_neg_exp.json @@ -0,0 +1 @@ +[123.456e-789] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_huge_exp.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_huge_exp.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_huge_exp.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_number_huge_exp.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_neg_int_huge_exp.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_neg_int_huge_exp.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_neg_int_huge_exp.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_number_neg_int_huge_exp.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/i_number_pos_double_huge_exp.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_pos_double_huge_exp.json new file mode 100644 index 000000000000..14b432dadb37 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_pos_double_huge_exp.json @@ -0,0 +1 @@ +[1.5e+9999] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_real_neg_overflow.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_real_neg_overflow.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_real_neg_overflow.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_number_real_neg_overflow.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_real_pos_overflow.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_real_pos_overflow.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_real_pos_overflow.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_number_real_pos_overflow.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_real_underflow.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_real_underflow.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_real_underflow.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_number_real_underflow.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/i_number_too_big_neg_int.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_too_big_neg_int.json new file mode 100644 index 000000000000..d6c26f1cf380 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_too_big_neg_int.json @@ -0,0 +1 @@ +[-123123123123123123123123123123] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/i_number_too_big_pos_int.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_too_big_pos_int.json new file mode 100644 index 000000000000..4d31d1b9078e --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_too_big_pos_int.json @@ -0,0 +1 @@ +[100000000000000000000] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_very_big_negative_int.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_number_very_big_negative_int.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_number_very_big_negative_int.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_number_very_big_negative_int.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_object_key_lone_2nd_surrogate.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_object_key_lone_2nd_surrogate.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_object_key_lone_2nd_surrogate.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_object_key_lone_2nd_surrogate.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_1st_surrogate_but_2nd_missing.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_1st_surrogate_but_2nd_missing.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_1st_surrogate_but_2nd_missing.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_1st_surrogate_but_2nd_missing.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_1st_valid_surrogate_2nd_invalid.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_1st_valid_surrogate_2nd_invalid.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_1st_valid_surrogate_2nd_invalid.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_1st_valid_surrogate_2nd_invalid.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/i_string_UTF-16LE_with_BOM.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_UTF-16LE_with_BOM.json new file mode 100644 index 000000000000..199605854565 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_UTF-16LE_with_BOM.json @@ -0,0 +1 @@ +["é"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_UTF-8_invalid_sequence.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_UTF-8_invalid_sequence.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_UTF-8_invalid_sequence.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_UTF-8_invalid_sequence.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_UTF8_surrogate_U+D800.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_UTF8_surrogate_U+D800.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_UTF8_surrogate_U+D800.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_UTF8_surrogate_U+D800.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_and_escape_valid.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_and_escape_valid.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_and_escape_valid.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_and_escape_valid.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_pair.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_pair.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_pair.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_incomplete_surrogate_pair.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_incomplete_surrogates_escape_valid.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_incomplete_surrogates_escape_valid.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_incomplete_surrogates_escape_valid.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_incomplete_surrogates_escape_valid.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_invalid_lonely_surrogate.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_invalid_lonely_surrogate.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_invalid_lonely_surrogate.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_invalid_lonely_surrogate.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_invalid_surrogate.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_invalid_surrogate.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_invalid_surrogate.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_invalid_surrogate.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_invalid_utf-8.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_invalid_utf-8.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_invalid_utf-8.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_invalid_utf-8.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_inverted_surrogates_U+1D11E.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_inverted_surrogates_U+1D11E.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_inverted_surrogates_U+1D11E.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_inverted_surrogates_U+1D11E.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_iso_latin_1.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_iso_latin_1.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_iso_latin_1.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_iso_latin_1.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_lone_second_surrogate.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_lone_second_surrogate.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_lone_second_surrogate.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_lone_second_surrogate.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_lone_utf8_continuation_byte.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_lone_utf8_continuation_byte.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_lone_utf8_continuation_byte.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_lone_utf8_continuation_byte.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_not_in_unicode_range.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_not_in_unicode_range.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_not_in_unicode_range.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_not_in_unicode_range.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_overlong_sequence_2_bytes.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_overlong_sequence_2_bytes.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_overlong_sequence_2_bytes.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_overlong_sequence_2_bytes.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes_null.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes_null.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes_null.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_overlong_sequence_6_bytes_null.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_truncated-utf-8.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_truncated-utf-8.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_truncated-utf-8.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_truncated-utf-8.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_utf16BE_no_BOM.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_utf16BE_no_BOM.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_utf16BE_no_BOM.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_utf16BE_no_BOM.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_utf16LE_no_BOM.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_string_utf16LE_no_BOM.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_string_utf16LE_no_BOM.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_string_utf16LE_no_BOM.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_structure_500_nested_arrays.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_structure_500_nested_arrays.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_structure_500_nested_arrays.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_structure_500_nested_arrays.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_structure_UTF-8_BOM_empty_object.json b/jsonc/testdata/JSONTestSuite/test_parsing/i_structure_UTF-8_BOM_empty_object.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/i_structure_UTF-8_BOM_empty_object.json rename to jsonc/testdata/JSONTestSuite/test_parsing/i_structure_UTF-8_BOM_empty_object.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_array_1_true_without_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_1_true_without_comma.json new file mode 100644 index 000000000000..de82d512e332 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_1_true_without_comma.json @@ -0,0 +1 @@ +[1, true] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_a_invalid_utf8.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_a_invalid_utf8.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_a_invalid_utf8.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_a_invalid_utf8.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_colon_instead_of_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_colon_instead_of_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_colon_instead_of_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_colon_instead_of_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_comma_after_close.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_comma_after_close.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_comma_after_close.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_comma_after_close.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_comma_and_number.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_comma_and_number.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_comma_and_number.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_comma_and_number.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_double_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_double_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_double_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_double_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_double_extra_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_double_extra_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_double_extra_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_double_extra_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_extra_close.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_extra_close.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_extra_close.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_extra_close.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_array_extra_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_extra_comma.json new file mode 100644 index 000000000000..66a1e1856064 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_extra_comma.json @@ -0,0 +1 @@ +[""] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_incomplete.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_incomplete.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_incomplete.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_incomplete.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_incomplete_invalid_value.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_incomplete_invalid_value.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_incomplete_invalid_value.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_incomplete_invalid_value.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_inner_array_no_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_inner_array_no_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_inner_array_no_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_inner_array_no_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_invalid_utf8.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_invalid_utf8.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_invalid_utf8.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_invalid_utf8.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_items_separated_by_semicolon.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_items_separated_by_semicolon.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_items_separated_by_semicolon.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_items_separated_by_semicolon.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_just_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_just_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_just_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_just_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_just_minus.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_just_minus.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_just_minus.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_just_minus.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_missing_value.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_missing_value.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_missing_value.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_missing_value.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_newlines_unclosed.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_newlines_unclosed.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_newlines_unclosed.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_newlines_unclosed.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_array_number_and_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_number_and_comma.json new file mode 100644 index 000000000000..7660873d1031 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_number_and_comma.json @@ -0,0 +1 @@ +[1] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_number_and_several_commas.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_number_and_several_commas.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_number_and_several_commas.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_number_and_several_commas.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_spaces_vertical_tab_formfeed.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_spaces_vertical_tab_formfeed.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_spaces_vertical_tab_formfeed.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_spaces_vertical_tab_formfeed.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_star_inside.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_star_inside.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_star_inside.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_star_inside.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_unclosed.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_unclosed.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_unclosed.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_unclosed.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_unclosed_trailing_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_unclosed_trailing_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_unclosed_trailing_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_unclosed_trailing_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_unclosed_with_new_lines.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_unclosed_with_new_lines.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_unclosed_with_new_lines.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_unclosed_with_new_lines.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_unclosed_with_object_inside.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_array_unclosed_with_object_inside.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_array_unclosed_with_object_inside.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_array_unclosed_with_object_inside.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_incomplete_false.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_incomplete_false.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_incomplete_false.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_incomplete_false.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_incomplete_null.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_incomplete_null.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_incomplete_null.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_incomplete_null.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_incomplete_true.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_incomplete_true.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_incomplete_true.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_incomplete_true.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_multidigit_number_then_00.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_multidigit_number_then_00.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_multidigit_number_then_00.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_multidigit_number_then_00.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_++.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_++.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_++.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_++.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_+1.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_+1.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_+1.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_+1.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_+Inf.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_+Inf.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_+Inf.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_+Inf.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_number_-01.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_-01.json new file mode 100644 index 000000000000..d24045afef65 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_-01.json @@ -0,0 +1 @@ +[-0, 1] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-1.0..json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_-1.0..json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-1.0..json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_-1.0..json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-2..json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_-2..json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-2..json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_-2..json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-NaN.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_-NaN.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_-NaN.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_-NaN.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_.-1.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_.-1.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_.-1.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_.-1.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_.2e-3.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_.2e-3.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_.2e-3.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_.2e-3.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0.1.2.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_0.1.2.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0.1.2.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_0.1.2.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0.3e+.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_0.3e+.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0.3e+.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_0.3e+.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0.3e.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_0.3e.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0.3e.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_0.3e.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0.e1.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_0.e1.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0.e1.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_0.e1.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0_capital_E+.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_0_capital_E+.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0_capital_E+.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_0_capital_E+.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0_capital_E.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_0_capital_E.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0_capital_E.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_0_capital_E.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0e+.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_0e+.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0e+.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_0e+.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0e.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_0e.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_0e.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_0e.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1.0e+.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_1.0e+.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1.0e+.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_1.0e+.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1.0e-.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_1.0e-.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1.0e-.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_1.0e-.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1.0e.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_1.0e.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1.0e.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_1.0e.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1_000.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_1_000.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1_000.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_1_000.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1eE2.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_1eE2.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_1eE2.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_1eE2.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_2.e+3.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_2.e+3.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_2.e+3.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_2.e+3.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_2.e-3.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_2.e-3.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_2.e-3.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_2.e-3.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_2.e3.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_2.e3.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_2.e3.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_2.e3.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_9.e+.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_9.e+.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_9.e+.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_9.e+.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_Inf.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_Inf.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_Inf.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_Inf.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_NaN.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_NaN.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_NaN.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_NaN.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_U+FF11_fullwidth_digit_one.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_U+FF11_fullwidth_digit_one.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_U+FF11_fullwidth_digit_one.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_U+FF11_fullwidth_digit_one.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_expression.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_expression.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_expression.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_expression.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_hex_1_digit.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_hex_1_digit.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_hex_1_digit.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_hex_1_digit.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_hex_2_digits.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_hex_2_digits.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_hex_2_digits.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_hex_2_digits.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_infinity.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_infinity.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_infinity.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_infinity.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid+-.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid+-.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid+-.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid+-.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid-negative-real.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid-negative-real.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid-negative-real.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid-negative-real.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-bigger-int.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-bigger-int.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-bigger-int.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-bigger-int.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-exponent.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-exponent.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-exponent.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-exponent.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-int.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-int.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-int.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_invalid-utf-8-in-int.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_minus_infinity.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_minus_infinity.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_minus_infinity.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_minus_infinity.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_minus_sign_with_trailing_garbage.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_minus_sign_with_trailing_garbage.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_minus_sign_with_trailing_garbage.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_minus_sign_with_trailing_garbage.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_minus_space_1.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_minus_space_1.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_minus_space_1.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_minus_space_1.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_number_neg_int_starting_with_zero.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_neg_int_starting_with_zero.json new file mode 100644 index 000000000000..2302858fe417 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_neg_int_starting_with_zero.json @@ -0,0 +1 @@ +[-0, 12] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_neg_real_without_int_part.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_neg_real_without_int_part.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_neg_real_without_int_part.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_neg_real_without_int_part.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_neg_with_garbage_at_end.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_neg_with_garbage_at_end.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_neg_with_garbage_at_end.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_neg_with_garbage_at_end.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_real_garbage_after_e.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_real_garbage_after_e.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_real_garbage_after_e.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_real_garbage_after_e.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_real_with_invalid_utf8_after_e.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_real_with_invalid_utf8_after_e.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_real_with_invalid_utf8_after_e.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_real_with_invalid_utf8_after_e.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_real_without_fractional_part.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_real_without_fractional_part.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_real_without_fractional_part.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_real_without_fractional_part.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_starting_with_dot.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_starting_with_dot.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_starting_with_dot.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_starting_with_dot.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_with_alpha.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_with_alpha.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_with_alpha.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_with_alpha.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_with_alpha_char.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_with_alpha_char.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_number_with_alpha_char.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_number_with_alpha_char.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_number_with_leading_zero.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_with_leading_zero.json new file mode 100644 index 000000000000..5d7a185cdec1 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_number_with_leading_zero.json @@ -0,0 +1 @@ +[0, 12] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_bad_value.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_bad_value.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_bad_value.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_bad_value.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_bracket_key.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_bracket_key.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_bracket_key.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_bracket_key.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_comma_instead_of_colon.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_comma_instead_of_colon.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_comma_instead_of_colon.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_comma_instead_of_colon.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_double_colon.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_double_colon.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_double_colon.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_double_colon.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_emoji.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_emoji.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_emoji.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_emoji.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_garbage_at_end.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_garbage_at_end.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_garbage_at_end.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_garbage_at_end.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_object_key_with_single_quotes.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_key_with_single_quotes.json new file mode 100644 index 000000000000..7ba1b793e58e --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_key_with_single_quotes.json @@ -0,0 +1 @@ +{ "key": "value" } diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_lone_continuation_byte_in_key_and_trailing_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_missing_colon.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_missing_colon.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_missing_colon.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_missing_colon.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_missing_key.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_missing_key.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_missing_key.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_missing_key.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_missing_semicolon.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_missing_semicolon.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_missing_semicolon.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_missing_semicolon.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_missing_value.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_missing_value.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_missing_value.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_missing_value.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_no-colon.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_no-colon.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_no-colon.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_no-colon.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_object_non_string_key.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_non_string_key.json new file mode 100644 index 000000000000..3f9f38cc57df --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_non_string_key.json @@ -0,0 +1 @@ +{ "1": 1 } diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_non_string_key_but_huge_number_instead.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_non_string_key_but_huge_number_instead.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_non_string_key_but_huge_number_instead.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_non_string_key_but_huge_number_instead.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_repeated_null_null.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_repeated_null_null.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_repeated_null_null.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_repeated_null_null.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_several_trailing_commas.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_several_trailing_commas.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_several_trailing_commas.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_several_trailing_commas.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_single_quote.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_single_quote.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_single_quote.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_single_quote.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comma.json new file mode 100644 index 000000000000..6c5af78ea946 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comma.json @@ -0,0 +1 @@ +{ "id": 0 } diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment_open.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment_open.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment_open.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment_open.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open.json new file mode 100644 index 000000000000..fcf8fdefcc4b --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open.json @@ -0,0 +1 @@ +{ "a": "b" } // diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open_incomplete.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open_incomplete.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open_incomplete.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_trailing_comment_slash_open_incomplete.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_two_commas_in_a_row.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_two_commas_in_a_row.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_two_commas_in_a_row.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_two_commas_in_a_row.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_object_unquoted_key.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_unquoted_key.json new file mode 100644 index 000000000000..b6f13e15edb7 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_unquoted_key.json @@ -0,0 +1 @@ +{ "a": "b" } diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_unterminated-value.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_unterminated-value.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_unterminated-value.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_unterminated-value.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_with_single_string.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_with_single_string.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_with_single_string.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_with_single_string.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_with_trailing_garbage.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_object_with_trailing_garbage.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_object_with_trailing_garbage.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_object_with_trailing_garbage.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_no_data.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_single_space.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_no_data.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_single_space.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1x.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1x.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1x.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_1_surrogate_then_escape_u1x.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_accentuated_char_no_quotes.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_accentuated_char_no_quotes.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_accentuated_char_no_quotes.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_accentuated_char_no_quotes.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_backslash_00.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_backslash_00.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_backslash_00.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_backslash_00.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_escape_x.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_escape_x.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_escape_x.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_escape_x.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_escaped_backslash_bad.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_escaped_backslash_bad.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_escaped_backslash_bad.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_escaped_backslash_bad.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_escaped_ctrl_char_tab.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_escaped_ctrl_char_tab.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_escaped_ctrl_char_tab.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_escaped_ctrl_char_tab.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_escaped_emoji.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_escaped_emoji.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_escaped_emoji.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_escaped_emoji.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_incomplete_escape.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_incomplete_escape.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_incomplete_escape.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_incomplete_escape.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_incomplete_escaped_character.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_incomplete_escaped_character.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_incomplete_escaped_character.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_incomplete_escaped_character.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_incomplete_surrogate.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_incomplete_surrogate.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_incomplete_surrogate.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_incomplete_surrogate.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_incomplete_surrogate_escape_invalid.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_incomplete_surrogate_escape_invalid.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_incomplete_surrogate_escape_invalid.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_incomplete_surrogate_escape_invalid.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_invalid-utf-8-in-escape.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_invalid-utf-8-in-escape.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_invalid-utf-8-in-escape.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_invalid-utf-8-in-escape.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_invalid_backslash_esc.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_invalid_backslash_esc.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_invalid_backslash_esc.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_invalid_backslash_esc.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_invalid_unicode_escape.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_invalid_unicode_escape.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_invalid_unicode_escape.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_invalid_unicode_escape.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_invalid_utf8_after_escape.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_invalid_utf8_after_escape.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_invalid_utf8_after_escape.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_invalid_utf8_after_escape.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_leading_uescaped_thinspace.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_leading_uescaped_thinspace.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_leading_uescaped_thinspace.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_leading_uescaped_thinspace.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_no_quotes_with_bad_escape.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_no_quotes_with_bad_escape.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_no_quotes_with_bad_escape.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_no_quotes_with_bad_escape.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_single_doublequote.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_single_doublequote.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_single_doublequote.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_single_doublequote.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_single_quote.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_single_quote.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_single_quote.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_single_quote.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_single_string_no_double_quotes.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_single_string_no_double_quotes.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_single_string_no_double_quotes.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_single_string_no_double_quotes.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_start_escape_unclosed.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_start_escape_unclosed.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_start_escape_unclosed.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_start_escape_unclosed.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_string_unescaped_ctrl_char.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_unescaped_ctrl_char.json new file mode 100644 index 000000000000..ecd30742b71a Binary files /dev/null and b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_unescaped_ctrl_char.json differ diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unescaped_newline.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_unescaped_newline.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unescaped_newline.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_unescaped_newline.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_string_unescaped_tab.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_unescaped_tab.json new file mode 100644 index 000000000000..bdce8c583d2b --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_unescaped_tab.json @@ -0,0 +1 @@ +[" "] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unicode_CapitalU.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_unicode_CapitalU.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_unicode_CapitalU.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_unicode_CapitalU.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_with_trailing_garbage.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_string_with_trailing_garbage.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_string_with_trailing_garbage.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_string_with_trailing_garbage.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_100000_opening_arrays.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_100000_opening_arrays.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_100000_opening_arrays.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_100000_opening_arrays.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_U+2060_word_joined.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_U+2060_word_joined.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_U+2060_word_joined.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_U+2060_word_joined.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_UTF8_BOM_no_data.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_UTF8_BOM_no_data.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_UTF8_BOM_no_data.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_UTF8_BOM_no_data.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_angle_bracket_..json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_angle_bracket_..json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_angle_bracket_..json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_angle_bracket_..json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_angle_bracket_null.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_angle_bracket_null.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_angle_bracket_null.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_angle_bracket_null.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_array_trailing_garbage.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_array_trailing_garbage.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_array_trailing_garbage.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_array_trailing_garbage.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_array_with_extra_array_close.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_array_with_extra_array_close.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_array_with_extra_array_close.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_array_with_extra_array_close.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_array_with_unclosed_string.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_array_with_unclosed_string.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_array_with_unclosed_string.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_array_with_unclosed_string.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_ascii-unicode-identifier.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_ascii-unicode-identifier.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_ascii-unicode-identifier.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_ascii-unicode-identifier.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_capitalized_True.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_capitalized_True.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_capitalized_True.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_capitalized_True.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_close_unopened_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_close_unopened_array.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_close_unopened_array.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_close_unopened_array.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_comma_instead_of_closing_brace.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_comma_instead_of_closing_brace.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_comma_instead_of_closing_brace.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_comma_instead_of_closing_brace.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_double_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_double_array.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_double_array.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_double_array.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_end_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_end_array.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_end_array.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_end_array.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_incomplete_UTF8_BOM.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_incomplete_UTF8_BOM.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_incomplete_UTF8_BOM.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_incomplete_UTF8_BOM.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_lone-invalid-utf-8.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_lone-invalid-utf-8.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_lone-invalid-utf-8.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_lone-invalid-utf-8.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_lone-open-bracket.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_lone-open-bracket.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_lone-open-bracket.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_lone-open-bracket.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_no_data.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_no_data.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_null-byte-outside-string.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_null-byte-outside-string.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_null-byte-outside-string.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_null-byte-outside-string.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_number_with_trailing_garbage.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_number_with_trailing_garbage.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_number_with_trailing_garbage.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_number_with_trailing_garbage.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_followed_by_closing_object.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_followed_by_closing_object.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_followed_by_closing_object.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_followed_by_closing_object.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_unclosed_no_value.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_unclosed_no_value.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_unclosed_no_value.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_unclosed_no_value.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_with_comment.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_with_comment.json new file mode 100644 index 000000000000..47d48035393e --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_with_comment.json @@ -0,0 +1 @@ +{ "a": /*comment*/ "b" } diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_with_trailing_garbage.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_with_trailing_garbage.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_object_with_trailing_garbage.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_object_with_trailing_garbage.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_apostrophe.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_apostrophe.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_apostrophe.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_apostrophe.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_object.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_object.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_object.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_object.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_open_object.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_open_object.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_open_object.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_open_object.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_open_string.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_open_string.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_open_string.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_open_string.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_string.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_string.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_array_string.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_array_string.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_close_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_close_array.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_close_array.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_close_array.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_comma.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_comma.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_comma.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_comma.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_open_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_open_array.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_open_array.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_open_array.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_open_string.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_open_string.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_open_string.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_open_string.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_string_with_apostrophes.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_string_with_apostrophes.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_object_string_with_apostrophes.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_object_string_with_apostrophes.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_open.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_open.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_open_open.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_open_open.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_single_eacute.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_single_eacute.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_single_eacute.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_single_eacute.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_single_star.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_single_star.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_single_star.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_single_star.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_trailing_#.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_trailing_#.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_trailing_#.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_trailing_#.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_uescaped_LF_before_string.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_uescaped_LF_before_string.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_uescaped_LF_before_string.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_uescaped_LF_before_string.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_array.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_array.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_array.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_array_partial_null.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_array_partial_null.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_array_partial_null.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_array_partial_null.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_false.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_false.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_false.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_false.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_true.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_true.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_true.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_array_unfinished_true.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_object.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_object.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unclosed_object.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unclosed_object.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unicode-identifier.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unicode-identifier.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_unicode-identifier.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_unicode-identifier.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_whitespace_U+2060_word_joiner.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_whitespace_U+2060_word_joiner.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/n_structure_whitespace_U+2060_word_joiner.json rename to jsonc/testdata/JSONTestSuite/test_parsing/n_structure_whitespace_U+2060_word_joiner.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_whitespace_formfeed.json b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_whitespace_formfeed.json new file mode 100644 index 000000000000..fe51488c7066 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/n_structure_whitespace_formfeed.json @@ -0,0 +1 @@ +[] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_arraysWithSpaces.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_arraysWithSpaces.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_arraysWithSpaces.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_array_arraysWithSpaces.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_array_empty-string.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_empty-string.json new file mode 100644 index 000000000000..66a1e1856064 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_empty-string.json @@ -0,0 +1 @@ +[""] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_array_empty.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_empty.json new file mode 100644 index 000000000000..fe51488c7066 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_empty.json @@ -0,0 +1 @@ +[] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_trailing_newline.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_ending_with_newline.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_trailing_newline.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_array_ending_with_newline.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_false.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_false.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_false.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_array_false.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_heterogeneous.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_heterogeneous.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_heterogeneous.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_array_heterogeneous.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_array_null.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_null.json new file mode 100644 index 000000000000..62864b313ddc --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_null.json @@ -0,0 +1 @@ +[null] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_1_and_newline.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_1_and_newline.json new file mode 100644 index 000000000000..7660873d1031 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_1_and_newline.json @@ -0,0 +1 @@ +[1] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_leading_space.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_leading_space.json new file mode 100644 index 000000000000..7660873d1031 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_leading_space.json @@ -0,0 +1 @@ +[1] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_several_null.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_several_null.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_several_null.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_several_null.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_trailing_space.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_trailing_space.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_array_with_trailing_space.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_array_with_trailing_space.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_0e+1.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_0e+1.json new file mode 100644 index 000000000000..72ed21d31cec --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_0e+1.json @@ -0,0 +1 @@ +[0e+1] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_0e1.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_0e1.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_0e1.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_0e1.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_after_space.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_after_space.json new file mode 100644 index 000000000000..8674624b1da8 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_after_space.json @@ -0,0 +1 @@ +[4] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_double_close_to_zero.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_double_close_to_zero.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_double_close_to_zero.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_double_close_to_zero.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_int_with_exp.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_int_with_exp.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_int_with_exp.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_int_with_exp.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_minus_zero.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_minus_zero.json new file mode 100644 index 000000000000..40fc49c7159d --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_minus_zero.json @@ -0,0 +1 @@ +[-0] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_int.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_int.json new file mode 100644 index 000000000000..a96d5cdb3172 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_int.json @@ -0,0 +1 @@ +[-123] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_one.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_one.json new file mode 100644 index 000000000000..2363a1ac08e2 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_one.json @@ -0,0 +1 @@ +[-1] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_zero.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_zero.json new file mode 100644 index 000000000000..40fc49c7159d --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_negative_zero.json @@ -0,0 +1 @@ +[-0] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_capital_e.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_capital_e.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_capital_e.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_capital_e.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_capital_e_neg_exp.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_capital_e_neg_exp.json new file mode 100644 index 000000000000..1e9fa515370a --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_capital_e_neg_exp.json @@ -0,0 +1 @@ +[1E-2] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_capital_e_pos_exp.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_capital_e_pos_exp.json new file mode 100644 index 000000000000..6a6ab9337153 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_capital_e_pos_exp.json @@ -0,0 +1 @@ +[1E+2] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_exponent.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_exponent.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_exponent.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_exponent.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_fraction_exponent.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_fraction_exponent.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_fraction_exponent.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_fraction_exponent.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_neg_exp.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_neg_exp.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_neg_exp.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_neg_exp.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_pos_exponent.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_pos_exponent.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_real_pos_exponent.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_real_pos_exponent.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_simple_int.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_simple_int.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_number_simple_int.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_number_simple_int.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_number_simple_real.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_simple_real.json new file mode 100644 index 000000000000..0fed7df36a1b --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_number_simple_real.json @@ -0,0 +1 @@ +[123.456789] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_object.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object.json new file mode 100644 index 000000000000..2f4219dfce2e --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_object.json @@ -0,0 +1 @@ +{ "asd": "sdf", "dfg": "fgh" } diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_basic.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_basic.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_basic.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_object_basic.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_duplicated_key.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_duplicated_key.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_duplicated_key.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_object_duplicated_key.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_object_duplicated_key_and_value.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_duplicated_key_and_value.json new file mode 100644 index 000000000000..d06ac05bb121 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_duplicated_key_and_value.json @@ -0,0 +1 @@ +{ "a": "b", "a": "b" } diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_object_empty.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_empty.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_empty.json @@ -0,0 +1 @@ +{} diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_empty_key.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_empty_key.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_empty_key.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_object_empty_key.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_escaped_null_in_key.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_escaped_null_in_key.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_object_escaped_null_in_key.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_object_escaped_null_in_key.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_object_extreme_numbers.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_extreme_numbers.json new file mode 100644 index 000000000000..56a908924484 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_extreme_numbers.json @@ -0,0 +1 @@ +{ "min": -1.0e+28, "max": 1.0e+28 } diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_object_long_strings.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_long_strings.json new file mode 100644 index 000000000000..3688a6599a53 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_long_strings.json @@ -0,0 +1,4 @@ +{ + "x": [{ "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }], + "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +} diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_object_simple.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_simple.json new file mode 100644 index 000000000000..8d19d9770f24 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_simple.json @@ -0,0 +1 @@ +{ "a": [] } diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_object_string_unicode.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_string_unicode.json new file mode 100644 index 000000000000..d7c78633096d --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_string_unicode.json @@ -0,0 +1,3 @@ +{ + "title": "\u041f\u043e\u043b\u0442\u043e\u0440\u0430 \u0417\u0435\u043c\u043b\u0435\u043a\u043e\u043f\u0430" +} diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_object_with_newlines.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_with_newlines.json new file mode 100644 index 000000000000..f949d3848a9b --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_object_with_newlines.json @@ -0,0 +1,3 @@ +{ + "a": "b" +} diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_1_2_3_bytes_UTF-8_sequences.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_1_2_3_bytes_UTF-8_sequences.json new file mode 100644 index 000000000000..0be5232ec17d --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_1_2_3_bytes_UTF-8_sequences.json @@ -0,0 +1 @@ +["\u0060\u012a\u12AB"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pair.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pair.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pair.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pair.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pairs.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pairs.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pairs.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_accepted_surrogate_pairs.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_allowed_escapes.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_allowed_escapes.json new file mode 100644 index 000000000000..d994564d3f08 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_allowed_escapes.json @@ -0,0 +1 @@ +["\"\\\/\b\f\n\r\t"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_backslash_and_u_escaped_zero.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_backslash_and_u_escaped_zero.json new file mode 100644 index 000000000000..2400da3f448d --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_backslash_and_u_escaped_zero.json @@ -0,0 +1 @@ +["\\u0000"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_backslash_doublequotes.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_backslash_doublequotes.json new file mode 100644 index 000000000000..988a0a97dd3e --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_backslash_doublequotes.json @@ -0,0 +1 @@ +["\""] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_comments.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_comments.json new file mode 100644 index 000000000000..60e9e8799d18 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_comments.json @@ -0,0 +1 @@ +["a/*b*/c/*d//e"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_double_escape_a.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_double_escape_a.json new file mode 100644 index 000000000000..7d7ebe5e0477 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_double_escape_a.json @@ -0,0 +1 @@ +["\\a"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_double_escape_n.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_double_escape_n.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_double_escape_n.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_double_escape_n.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_escaped_control_character.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_escaped_control_character.json new file mode 100644 index 000000000000..9ecbd3995c75 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_escaped_control_character.json @@ -0,0 +1 @@ +["\u0012"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_escaped_noncharacter.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_escaped_noncharacter.json new file mode 100644 index 000000000000..9eaa76c3ceb4 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_escaped_noncharacter.json @@ -0,0 +1 @@ +["\uFFFF"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_in_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_in_array.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_in_array.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_in_array.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_in_array_with_leading_space.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_in_array_with_leading_space.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_in_array_with_leading_space.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_in_array_with_leading_space.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_last_surrogates_1_and_2.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_last_surrogates_1_and_2.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_last_surrogates_1_and_2.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_last_surrogates_1_and_2.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_nbsp_uescaped.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_nbsp_uescaped.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_nbsp_uescaped.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_nbsp_uescaped.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+10FFFF.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+10FFFF.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+10FFFF.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+10FFFF.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+FFFF.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+FFFF.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+FFFF.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_nonCharacterInUTF-8_U+FFFF.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_null_escape.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_null_escape.json new file mode 100644 index 000000000000..39fde2f49268 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_null_escape.json @@ -0,0 +1 @@ +["\u0000"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_one-byte-utf-8.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_one-byte-utf-8.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_one-byte-utf-8.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_one-byte-utf-8.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_pi.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_pi.json new file mode 100644 index 000000000000..72ecae9c83ed --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_pi.json @@ -0,0 +1 @@ +["π"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_reservedCharacterInUTF-8_U+1BFFF.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_reservedCharacterInUTF-8_U+1BFFF.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_reservedCharacterInUTF-8_U+1BFFF.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_reservedCharacterInUTF-8_U+1BFFF.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_simple_ascii.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_simple_ascii.json new file mode 100644 index 000000000000..1f91cc9921d2 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_simple_ascii.json @@ -0,0 +1 @@ +["asd "] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_space.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_space.json new file mode 100644 index 000000000000..dca73c30ff10 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_space.json @@ -0,0 +1 @@ +" " diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_three-byte-utf-8.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_three-byte-utf-8.json new file mode 100644 index 000000000000..3d62cbcffdb8 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_three-byte-utf-8.json @@ -0,0 +1 @@ +["\u0821"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_two-byte-utf-8.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_two-byte-utf-8.json new file mode 100644 index 000000000000..cecb5f54a1b4 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_two-byte-utf-8.json @@ -0,0 +1 @@ +["\u0123"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_u+2028_line_sep.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_u+2028_line_sep.json new file mode 100644 index 000000000000..dca60db470a3 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_u+2028_line_sep.json @@ -0,0 +1 @@ +["
"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_u+2029_par_sep.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_u+2029_par_sep.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_u+2029_par_sep.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_u+2029_par_sep.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_uEscape.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_uEscape.json new file mode 100644 index 000000000000..745e6df984d4 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_uEscape.json @@ -0,0 +1 @@ +["\u0061\u30af\u30EA\u30b9"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_uescaped_newline.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_uescaped_newline.json new file mode 100644 index 000000000000..87c334d482b3 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_uescaped_newline.json @@ -0,0 +1 @@ +["new\u000Aline"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unescaped_char_delete.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unescaped_char_delete.json new file mode 100644 index 000000000000..908271834402 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unescaped_char_delete.json @@ -0,0 +1 @@ +[""] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode.json new file mode 100644 index 000000000000..a43dcba4fef2 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode.json @@ -0,0 +1 @@ +["\uA66D"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicodeEscapedBackslash.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicodeEscapedBackslash.json new file mode 100644 index 000000000000..92030fb2ddd0 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicodeEscapedBackslash.json @@ -0,0 +1 @@ +["\u005C"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_2.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_2.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_2.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_2.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+10FFFE_nonchar.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+10FFFE_nonchar.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+10FFFE_nonchar.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+10FFFE_nonchar.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+1FFFE_nonchar.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+1FFFE_nonchar.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+1FFFE_nonchar.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+1FFFE_nonchar.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json new file mode 100644 index 000000000000..ca40038b1634 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+200B_ZERO_WIDTH_SPACE.json @@ -0,0 +1 @@ +["\u200B"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+2064_invisible_plus.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+2064_invisible_plus.json new file mode 100644 index 000000000000..e91bcdcd1f2c --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+2064_invisible_plus.json @@ -0,0 +1 @@ +["\u2064"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+FDD0_nonchar.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+FDD0_nonchar.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+FDD0_nonchar.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+FDD0_nonchar.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+FFFE_nonchar.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+FFFE_nonchar.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_unicode_U+FFFE_nonchar.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_U+FFFE_nonchar.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_escaped_double_quote.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_escaped_double_quote.json new file mode 100644 index 000000000000..86e2d279cbf4 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_unicode_escaped_double_quote.json @@ -0,0 +1 @@ +["\u0022"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_string_utf8.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_utf8.json new file mode 100644 index 000000000000..720f67f79133 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_utf8.json @@ -0,0 +1 @@ +["€𝄞"] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_with_del_character.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_string_with_del_character.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_string_with_del_character.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_string_with_del_character.json diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_false.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_false.json new file mode 100644 index 000000000000..c508d5366f70 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_false.json @@ -0,0 +1 @@ +false diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_int.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_int.json new file mode 100644 index 000000000000..d81cc0710eb6 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_int.json @@ -0,0 +1 @@ +42 diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_negative_real.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_negative_real.json new file mode 100644 index 000000000000..d99fd3abbd73 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_negative_real.json @@ -0,0 +1 @@ +-0.1 diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_null.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_null.json new file mode 100644 index 000000000000..19765bd501b6 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_null.json @@ -0,0 +1 @@ +null diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_string.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_string.json new file mode 100644 index 000000000000..83fe4c54a41b --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_string.json @@ -0,0 +1 @@ +"asd" diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_true.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_true.json new file mode 100644 index 000000000000..27ba77ddaf61 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_lonely_true.json @@ -0,0 +1 @@ +true diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_string_empty.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_string_empty.json new file mode 100644 index 000000000000..e16c76dff888 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_string_empty.json @@ -0,0 +1 @@ +"" diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_trailing_newline.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_trailing_newline.json new file mode 100644 index 000000000000..0c3426d4c287 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_trailing_newline.json @@ -0,0 +1 @@ +["a"] diff --git a/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_true_in_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_true_in_array.json new file mode 100644 index 000000000000..29513c49176b --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_true_in_array.json @@ -0,0 +1 @@ +[true] diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_whitespace_array.json b/jsonc/testdata/JSONTestSuite/test_parsing/y_structure_whitespace_array.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_parsing/y_structure_whitespace_array.json rename to jsonc/testdata/JSONTestSuite/test_parsing/y_structure_whitespace_array.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_-9223372036854775808.json b/jsonc/testdata/JSONTestSuite/test_transform/number_-9223372036854775808.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_-9223372036854775808.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_-9223372036854775808.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_-9223372036854775809.json b/jsonc/testdata/JSONTestSuite/test_transform/number_-9223372036854775809.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_-9223372036854775809.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_-9223372036854775809.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1.0.json b/jsonc/testdata/JSONTestSuite/test_transform/number_1.0.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1.0.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_1.0.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1.000000000000000005.json b/jsonc/testdata/JSONTestSuite/test_transform/number_1.000000000000000005.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1.000000000000000005.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_1.000000000000000005.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1000000000000000.json b/jsonc/testdata/JSONTestSuite/test_transform/number_1000000000000000.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1000000000000000.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_1000000000000000.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_10000000000000000999.json b/jsonc/testdata/JSONTestSuite/test_transform/number_10000000000000000999.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_10000000000000000999.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_10000000000000000999.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1e-999.json b/jsonc/testdata/JSONTestSuite/test_transform/number_1e-999.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1e-999.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_1e-999.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1e6.json b/jsonc/testdata/JSONTestSuite/test_transform/number_1e6.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_1e6.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_1e6.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_9223372036854775807.json b/jsonc/testdata/JSONTestSuite/test_transform/number_9223372036854775807.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_9223372036854775807.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_9223372036854775807.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/number_9223372036854775808.json b/jsonc/testdata/JSONTestSuite/test_transform/number_9223372036854775808.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/number_9223372036854775808.json rename to jsonc/testdata/JSONTestSuite/test_transform/number_9223372036854775808.json diff --git a/jsonc/testdata/JSONTestSuite/test_transform/object_key_nfc_nfd.json b/jsonc/testdata/JSONTestSuite/test_transform/object_key_nfc_nfd.json new file mode 100644 index 000000000000..c0ca1dfd689b --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_transform/object_key_nfc_nfd.json @@ -0,0 +1 @@ +{ "é": "NFC", "é": "NFD" } diff --git a/jsonc/testdata/JSONTestSuite/test_transform/object_key_nfd_nfc.json b/jsonc/testdata/JSONTestSuite/test_transform/object_key_nfd_nfc.json new file mode 100644 index 000000000000..c193c9e480d2 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_transform/object_key_nfd_nfc.json @@ -0,0 +1 @@ +{ "é": "NFD", "é": "NFC" } diff --git a/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_different_values.json b/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_different_values.json new file mode 100644 index 000000000000..6946832dce3c --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_different_values.json @@ -0,0 +1 @@ +{ "a": 1, "a": 2 } diff --git a/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_same_value.json b/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_same_value.json new file mode 100644 index 000000000000..2ec24d142d49 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_same_value.json @@ -0,0 +1 @@ +{ "a": 1, "a": 1 } diff --git a/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_unclear_values.json b/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_unclear_values.json new file mode 100644 index 000000000000..0e38f3f1429f --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_transform/object_same_key_unclear_values.json @@ -0,0 +1 @@ +{ "a": 0, "a": -0 } diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_1_escaped_invalid_codepoint.json b/jsonc/testdata/JSONTestSuite/test_transform/string_1_escaped_invalid_codepoint.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/string_1_escaped_invalid_codepoint.json rename to jsonc/testdata/JSONTestSuite/test_transform/string_1_escaped_invalid_codepoint.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_1_invalid_codepoint.json b/jsonc/testdata/JSONTestSuite/test_transform/string_1_invalid_codepoint.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/string_1_invalid_codepoint.json rename to jsonc/testdata/JSONTestSuite/test_transform/string_1_invalid_codepoint.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_2_escaped_invalid_codepoints.json b/jsonc/testdata/JSONTestSuite/test_transform/string_2_escaped_invalid_codepoints.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/string_2_escaped_invalid_codepoints.json rename to jsonc/testdata/JSONTestSuite/test_transform/string_2_escaped_invalid_codepoints.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_2_invalid_codepoints.json b/jsonc/testdata/JSONTestSuite/test_transform/string_2_invalid_codepoints.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/string_2_invalid_codepoints.json rename to jsonc/testdata/JSONTestSuite/test_transform/string_2_invalid_codepoints.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_3_escaped_invalid_codepoints.json b/jsonc/testdata/JSONTestSuite/test_transform/string_3_escaped_invalid_codepoints.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/string_3_escaped_invalid_codepoints.json rename to jsonc/testdata/JSONTestSuite/test_transform/string_3_escaped_invalid_codepoints.json diff --git a/encoding/testdata/jsonc/JSONTestSuite/test_transform/string_3_invalid_codepoints.json b/jsonc/testdata/JSONTestSuite/test_transform/string_3_invalid_codepoints.json similarity index 100% rename from encoding/testdata/jsonc/JSONTestSuite/test_transform/string_3_invalid_codepoints.json rename to jsonc/testdata/JSONTestSuite/test_transform/string_3_invalid_codepoints.json diff --git a/jsonc/testdata/JSONTestSuite/test_transform/string_with_escaped_NULL.json b/jsonc/testdata/JSONTestSuite/test_transform/string_with_escaped_NULL.json new file mode 100644 index 000000000000..16248e6fb356 --- /dev/null +++ b/jsonc/testdata/JSONTestSuite/test_transform/string_with_escaped_NULL.json @@ -0,0 +1 @@ +["A\u0000B"] diff --git a/encoding/testdata/jsonc/README.md b/jsonc/testdata/README.md similarity index 100% rename from encoding/testdata/jsonc/README.md rename to jsonc/testdata/README.md diff --git a/encoding/testdata/jsonc/node-jsonc-parser/README.md b/jsonc/testdata/node-jsonc-parser/README.md similarity index 100% rename from encoding/testdata/jsonc/node-jsonc-parser/README.md rename to jsonc/testdata/node-jsonc-parser/README.md diff --git a/encoding/testdata/jsonc/node-jsonc-parser/test.ts b/jsonc/testdata/node-jsonc-parser/test.ts similarity index 97% rename from encoding/testdata/jsonc/node-jsonc-parser/test.ts rename to jsonc/testdata/node-jsonc-parser/test.ts index a2712a6772f1..bf5e3283b652 100644 --- a/encoding/testdata/jsonc/node-jsonc-parser/test.ts +++ b/jsonc/testdata/node-jsonc-parser/test.ts @@ -6,8 +6,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as JSONC from "../../../jsonc.ts"; -import { assertEquals, assertThrows } from "../../../../testing/asserts.ts"; +import * as JSONC from "../../parse.ts"; +import { assertEquals, assertThrows } from "../../../testing/asserts.ts"; function assertValidParse( text: string, expected: unknown, diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-1.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-0-1.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-1.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-0-1.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-2.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-0-2.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-2.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-0-2.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-3.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-0-3.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-3.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-0-3.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-4.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-0-4.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-4.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-0-4.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-5.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-0-5.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-5.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-0-5.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-6.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-0-6.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-6.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-0-6.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-8.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-0-8.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-8.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-0-8.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-9.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-0-9.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-0-9.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-0-9.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g1-1.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g1-1.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g1-1.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g1-1.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g1-2.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g1-2.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g1-2.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g1-2.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g1-3.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g1-3.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g1-3.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g1-3.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g1-4.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g1-4.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g1-4.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g1-4.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-1.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-1.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-1.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-1.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-2.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-2.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-2.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-2.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-3.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-3.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-3.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-3.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-4.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-4.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-4.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-4.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-5.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-5.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g2-5.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g2-5.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g4-1.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g4-1.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g4-1.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g4-1.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g4-2.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g4-2.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g4-2.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g4-2.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g4-3.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g4-3.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g4-3.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g4-3.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g4-4.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g4-4.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g4-4.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g4-4.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g5-1.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g5-1.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g5-1.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g5-1.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g5-2.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g5-2.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g5-2.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g5-2.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g5-3.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g5-3.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g5-3.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g5-3.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-1.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-1.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-1.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-1.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-2.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-2.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-2.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-2.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-3.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-3.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-3.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-3.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-4.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-4.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-4.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-4.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-5.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-5.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-5.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-5.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-6.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-6.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-6.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-6.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-7.js b/jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-7.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.1.1-g6-7.js rename to jsonc/testdata/test262/JSON/parse/15.12.1.1-g6-7.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-1.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-1.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-1.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-1.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-10.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-10.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-10.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-10.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-2.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-2.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-2.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-2.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-3.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-3.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-3.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-3.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-4.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-4.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-4.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-4.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-5.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-5.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-5.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-5.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-6.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-6.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-6.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-6.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-7.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-7.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-7.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-7.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-8.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-8.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-8.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-8.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-9.js b/jsonc/testdata/test262/JSON/parse/15.12.2-2-9.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/15.12.2-2-9.js rename to jsonc/testdata/test262/JSON/parse/15.12.2-2-9.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/S15.12.2_A1.js b/jsonc/testdata/test262/JSON/parse/S15.12.2_A1.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/S15.12.2_A1.js rename to jsonc/testdata/test262/JSON/parse/S15.12.2_A1.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/duplicate-proto.js b/jsonc/testdata/test262/JSON/parse/duplicate-proto.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/duplicate-proto.js rename to jsonc/testdata/test262/JSON/parse/duplicate-proto.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/invalid-whitespace.js b/jsonc/testdata/test262/JSON/parse/invalid-whitespace.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/invalid-whitespace.js rename to jsonc/testdata/test262/JSON/parse/invalid-whitespace.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/name.js b/jsonc/testdata/test262/JSON/parse/name.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/name.js rename to jsonc/testdata/test262/JSON/parse/name.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/text-negative-zero.js b/jsonc/testdata/test262/JSON/parse/text-negative-zero.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/text-negative-zero.js rename to jsonc/testdata/test262/JSON/parse/text-negative-zero.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/text-non-string-primitive.js b/jsonc/testdata/test262/JSON/parse/text-non-string-primitive.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/text-non-string-primitive.js rename to jsonc/testdata/test262/JSON/parse/text-non-string-primitive.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/text-object-abrupt.js b/jsonc/testdata/test262/JSON/parse/text-object-abrupt.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/text-object-abrupt.js rename to jsonc/testdata/test262/JSON/parse/text-object-abrupt.js diff --git a/encoding/testdata/jsonc/test262/JSON/parse/text-object.js b/jsonc/testdata/test262/JSON/parse/text-object.js similarity index 100% rename from encoding/testdata/jsonc/test262/JSON/parse/text-object.js rename to jsonc/testdata/test262/JSON/parse/text-object.js diff --git a/encoding/testdata/jsonc/test262/README.md b/jsonc/testdata/test262/README.md similarity index 100% rename from encoding/testdata/jsonc/test262/README.md rename to jsonc/testdata/test262/README.md diff --git a/encoding/testdata/jsonc/test262/assert.js b/jsonc/testdata/test262/assert.js similarity index 100% rename from encoding/testdata/jsonc/test262/assert.js rename to jsonc/testdata/test262/assert.js diff --git a/encoding/testdata/jsonc/test262/propertyHelper.js b/jsonc/testdata/test262/propertyHelper.js similarity index 100% rename from encoding/testdata/jsonc/test262/propertyHelper.js rename to jsonc/testdata/test262/propertyHelper.js diff --git a/encoding/testdata/jsonc/test262/sta.js b/jsonc/testdata/test262/sta.js similarity index 100% rename from encoding/testdata/jsonc/test262/sta.js rename to jsonc/testdata/test262/sta.js diff --git a/encoding/testdata/jsonc/test262/test.ts b/jsonc/testdata/test262/test.ts similarity index 86% rename from encoding/testdata/jsonc/test262/test.ts rename to jsonc/testdata/test262/test.ts index 5a80f00b79b7..558486db5871 100644 --- a/encoding/testdata/jsonc/test262/test.ts +++ b/jsonc/testdata/test262/test.ts @@ -1,7 +1,7 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -import { walk } from "../../../../fs/mod.ts"; -import { fromFileUrl } from "../../../../path/mod.ts"; +import { walk } from "../../../fs/mod.ts"; +import { fromFileUrl } from "../../../path/mod.ts"; // helper used for testing const sta = await Deno.readTextFile(new URL("./sta.js", import.meta.url)); @@ -9,7 +9,7 @@ const assert = await Deno.readTextFile(new URL("./assert.js", import.meta.url)); const propertyHelper = await Deno.readTextFile( new URL("./propertyHelper.js", import.meta.url), ); -const jsoncModule = new URL("../../../jsonc.ts", import.meta.url); +const jsoncModule = new URL("../../parse.ts", import.meta.url); for await ( const dirEntry of walk(fromFileUrl(new URL("./JSON/", import.meta.url))) ) {