Lines Matching refs:JSON
6 assertEquals('{"x":1}', JSON.stringify({ x : 1 }, ["x", 1, "x", 1]));
7 assertEquals('{"1":1}', JSON.stringify({ 1 : 1 }, ["x", 1, "x", 1]));
8 assertEquals('{"1":1}', JSON.stringify({ 1 : 1 }, ["1", 1, "1", 1]));
9 assertEquals('{"1":1}', JSON.stringify({ 1 : 1 }, [1, "1", 1, "1"]));
14 assertEquals('{"x":2}', JSON.stringify(getter_obj, ["x", "y", "x"]));
18 assertEquals('{"y":4,"x":3}', JSON.stringify({ x : 3, y : 4}, ["y", "x"]));
20 JSON.stringify({ x : 3, y : 4, 1 : 2 }, ["y", 1, "x"]));
26 JSON.stringify(a, ["__proto__", "x", "__proto__"]));
29 JSON.stringify(a, ["__proto__", "x"]));
31 assertEquals('{}', JSON.stringify(b));
32 assertEquals('{"x":9}', JSON.stringify(b, ["x"]));
35 assertEquals('{}', JSON.stringify(c));
36 assertEquals('{"x":10}', JSON.stringify(c, ["x"]));
39 assertEquals("[9,8,7]", JSON.stringify([9, 8, 7], [1, 1]));
42 assertEquals('[11,12,13]', JSON.stringify(mixed_arr, [1, 0, 1]));
48 assertEquals('{"1":5,"0":6}', JSON.stringify(mixed_obj, [1, 0, 1]));
52 JSON.stringify({ x: 1, y:2, z: {x:3, b:4}}, ["z","x"]));
56 JSON.stringify({ x : 1, "1": 1 }, [{}]));
58 JSON.stringify({ x : 1, "1": 1 }, [true, undefined, null]));
60 JSON.stringify({ x : 1, "1": 1 },
63 JSON.stringify({ x : 1, "1": 1 },
68 assertEquals('{"toString":42}', JSON.stringify({ toString: 42 }, ["toString"]));
72 JSON.stringify({ 1: 1, s: "s" },