Home
last modified time | relevance | path

Searched refs:JSON (Results 1 – 25 of 119) sorted by relevance

12345

/arkcompiler/ets_runtime/test/moduletest/jsonparser/
Djsonparser.js23 let json = JSON.parse("[ 1, 2, 3]");
25 let json2 = JSON.parse("[ 1 ]");
27 let json3 = JSON.parse("[ ]");
34 let strData = JSON.stringify(data);
35 let res = JSON.parse(strData);
42 var o = JSON.parse(a, reviver);
46 let res2 = JSON.parse(strData2);
50 let res3 = JSON.parse(strData3);
54 let res4 = JSON.parse(strData4);
58 print(JSON.parse(`{"object": 42, "test":{}`))
[all …]
/arkcompiler/ets_runtime/test/moduletest/jsonstringifier/
Djsonstringifier.js30 JSON.stringify(v2);
38 print(JSON.stringify(obj));
43 print(JSON.stringify(a))
59 print(JSON.stringify(o))
68 print(JSON.stringify(o2))
77 print(JSON.stringify(parent2))
86 print(JSON.stringify(obj))
95 print(JSON.stringify(list));
101 print(JSON.stringify(linkList));
105 print(JSON.stringify([{}],[String],v6))
[all …]
/arkcompiler/ets_runtime/test/moduletest/regress/
Dregress.js17 print(JSON.stringify({ x : 1 }, ["x", 1, "x", 1]));
18 print(JSON.stringify({ 1 : 1 }, ["x", 1, "x", 1]));
19 print(JSON.stringify({ 1 : 1 }, ["1", 1, "1", 1]));
20 print(JSON.stringify({ 1 : 1 }, [1, "1", 1, "1"]));
24 print(JSON.stringify(getter_obj, ["x", "y", "x"]));
27 print(JSON.stringify({ x : 3, y : 4}, ["y", "x"]));
28 print(JSON.stringify({ x : 3, y : 4, 1 : 2 }, ["y", 1, "x"]));
32 print(JSON.stringify(a, ["__proto__", "x", "__proto__"]));
34 print(JSON.stringify(a, ["__proto__", "x"]));
36 print(JSON.stringify(b));
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/escompat/
DJsonTest.ets27 return test(JSON.parse<Object>("null", nullType) == null, "Null")
32 …return test((JSON.parse<Object>("true", booleanType) as Boolean).unboxed() == true, "Boolean(true)…
33 … test((JSON.parse<Object>("false", booleanType) as Boolean).unboxed() == false, "Boolean(false)")
38 return test((JSON.parse<Object>("0", doubleType) as Double).unboxed() == 0, "Double(0)") +
39 test((JSON.parse<Object>("1", doubleType) as Double).unboxed() == 1, "Double(1)") +
40 test((JSON.parse<Object>("-1", doubleType) as Double).unboxed() == -1, "Double(-1)") +
41 …test((JSON.parse<Object>("2.72182", doubleType) as Double).unboxed() == 2.72182, "Double(2.72182)"…
42 …test((JSON.parse<Object>("-2.72182", doubleType) as Double).unboxed() == -2.72182, "Double(-2.7218…
47 …return test(JSON.parse<Object>("\"Gracias\"", stringType) as String == "Gracias", "String(Gracias)…
48 test(JSON.parse<Object>("\"\"", stringType) as String == "", "String()")
[all …]
/arkcompiler/ets_runtime/test/moduletest/arraysort/
Darraysort.js40 print(JSON.stringify(objHandler1));
44 print(JSON.stringify(objHandler1));
57 print(JSON.stringify(objHandler2));
69 print(JSON.stringify(arr1));
79 print(JSON.stringify(arr2));
88 print(JSON.stringify(arr3));
95 print(JSON.stringify(obj1));
105 print(JSON.stringify(obj2));
112 print(JSON.stringify(obj3));
119 print(JSON.stringify(obj4));
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat/
Djson.ets18 export class JSON {
20 * Converts byte to JSON format
22 * @param d: byte - byte to be converted to a JSON as a Number
24 * @returns String - JSON representation of byte
31 * Converts short to JSON format
33 * @param d: short - short to be converted to a JSON as a Number
35 * @returns String - JSON representation of short
42 * Converts int to JSON format
44 * @param d: int - int to be converted to a JSON as a Number
46 * @returns String - JSON representation of int
[all …]
/arkcompiler/ets_runtime/test/moduletest/require/
Drequire.js25 var strB = JSON.stringify(b);
26 var strC = JSON.stringify(c);
27 var strIndex = JSON.stringify(index);
/arkcompiler/ets_frontend/arkguard/test/grammar/data_type/
Djson_validation.ts20 let json_obj = JSON.parse(json_str);
22 let json_str2 = JSON.stringify(json_obj);
/arkcompiler/ets_runtime/test/moduletest/moduleUseCjs/
DmoduleUseCjs.js28 print(JSON.stringify(cjs));
29 print(JSON.stringify(json));
/arkcompiler/ets_runtime/test/moduletest/arrayjoin/
Darrayjoin.js24 var str1 = JSON.stringify(Array(3).join("0"));
26 var str2 = JSON.stringify(new Array(3).join("0"));
30 var str3 = JSON.stringify(arr.join("0"));
/arkcompiler/runtime_core/static_core/templates/
Dmerge.rb58 data = JSON.parse(data.to_json)
97 data = JSON.parse(data.to_json)
100 output_yaml = YAML.dump(JSON.load(data.to_json))
/arkcompiler/runtime_core/templates/
Dmerge.rb58 data = JSON.parse(data.to_json)
97 data = JSON.parse(data.to_json)
100 output_yaml = YAML.dump(JSON.load(data.to_json))
/arkcompiler/ets_frontend/arkguard/src/utils/
DNameCacheUtil.ts28 const cacheString: string = JSON.stringify(Object.fromEntries(cache), null, spaceOfNameCache);
40 return JSON.parse(cacheString);
/arkcompiler/ets_frontend/arkguard/src/common/
Dtype.ts22 JSON = '.json', enumerator
35 …ing[] = [Extension.DETS, Extension.ETS, Extension.DTS, Extension.TS, Extension.JS, Extension.JSON];
/arkcompiler/ets_runtime/test/moduletest/linkedhashtable/
Dlinkedhashtable.js24 let res = JSON.stringify(obj1);
25 let parseObj = JSON.parse(res);
/arkcompiler/ets_frontend/ts2panda/src/
Dts2panda.ts194 let jsonStrUnicode = escapeUnicode(JSON.stringify(strObject, null, 2));
210 jsonTypeString += escapeUnicode(JSON.stringify(literalArrays[1+i], null, 2));
222 console.log(util.inspect(JSON.parse(JSON.stringify(e)), { maxArrayLength: null }));
231 let jsonLiteralArrUnicode = escapeUnicode(JSON.stringify(literalArrayObject, null, 2));
258 let jsonOpt = JSON.stringify(options, null, 2);
273 let jsonRecord = escapeUnicode(JSON.stringify(record, null, 2));
471 let jsonFuncUnicode = escapeUnicode(JSON.stringify(funcObject, null, 2));
486 let jsonModuleUnicode = escapeUnicode(JSON.stringify(moduleObject, null, 2));
510 let jsonTypeInfoUnicode = escapeUnicode(JSON.stringify(typeInfoObject, null, 2));
525 …let jsonInputJsonFileContentUnicode = escapeUnicode(JSON.stringify(inputJsonFileContentObject, nul…
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_func_tests/spec/annotations/
Dannotation_@Observed.ets39 Text(`link: ${JSON.stringify(this.link)}`)
46 Text(`prop: ${JSON.stringify(this.prop)}`)
53 Text(`objLink: ${JSON.stringify(this.objLink)}`)
71 Text(`parent: ${JSON.stringify(this.parent)}`)
/arkcompiler/ets_runtime/test/fuzztest/jsonparse_fuzzer/
Djsonparse_fuzzer.cpp48 Local<JSValueRef> jsValue = JSON::Parse(vm, res); in JSONParseFuzzTest()
49 JSON::Stringify(vm, jsValue); in JSONParseFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/jsonstringify_fuzzer/
Djsonstringify_fuzzer.cpp48 Local<JSValueRef> jsValue = JSON::Parse(vm, res); in JSONStringifyFuzzTest()
49 JSON::Stringify(vm, jsValue); in JSONStringifyFuzzTest()
/arkcompiler/ets_runtime/test/moduletest/objoperate/
Dobjoperate.js23 var t1 = JSON.stringify(a);
24 var t2 = JSON.stringify(b);
/arkcompiler/ets_frontend/ets2panda/linter-4.2/test_extended_features/
DUI_Decorators_@ObjectLink.ets32 Text(`objLink: ${JSON.stringify(this.objLink)}`)
49 Text(`arr: ${JSON.stringify(this.arr)}`)
57 Text(`single: ${JSON.stringify(this.single)}`)
/arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/proxies/ets_proxy/
Dcheck_access_references.js47 ASSERT_EQ(JSON.stringify(ra.f_A_String), JSON.stringify(arr));
/arkcompiler/ets_frontend/ets2panda/linter-4.2/src/
DTestRunner.ts118 const args = JSON.parse(data);
159 expectedResult = JSON.parse(expectedResultFile);
223 const actualResultJSON = JSON.stringify({ nodes: resultNodes }, null, 4);
232 let expectedNode = JSON.stringify({ nodes: [expected] }, null, 4);
233 let actualNode = JSON.stringify({ nodes: [actual] }, null, 4);
/arkcompiler/ets_frontend/ets2panda/linter/src/
DTestRunner.ts118 const args = JSON.parse(data);
159 expectedResult = JSON.parse(expectedResultFile);
223 const actualResultJSON = JSON.stringify({ nodes: resultNodes }, null, 4);
232 let expectedNode = JSON.stringify({ nodes: [expected] }, null, 4);
233 let actualNode = JSON.stringify({ nodes: [actual] }, null, 4);
/arkcompiler/ets_runtime/test/moduletest/dataproperty/
Ddataproperty.js28 print(JSON.stringify(o));

12345