Home
last modified time | relevance | path

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

12345678910>>...20

/external/v8/test/mjsunit/
Djson.js46 assertTrue(Object.prototype === JSON.__proto__);
47 assertEquals("[object JSON]", Object.prototype.toString.call(JSON));
92 assertEquals({}, JSON.parse("{}"));
93 assertEquals({42:37}, JSON.parse('{"42":37}'));
94 assertEquals(null, JSON.parse("null"));
95 assertEquals(true, JSON.parse("true"));
96 assertEquals(false, JSON.parse("false"));
97 assertEquals("foo", JSON.parse('"foo"'));
98 assertEquals("f\no", JSON.parse('"f\\no"'));
100 JSON.parse('"\\b\\f\\n\\r\\t\\"\\u2028\\/\\\\"'));
[all …]
/external/chromium_org/third_party/JSON/out/lib/perl5/
DJSON.pm1 package JSON; package
7 @JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
10 $JSON::VERSION = '2.59';
11 $JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
12 $JSON::DEBUG = $ENV{ PERL_JSON_DEBUG } if exists $ENV{ PERL_JSON_DEBUG };
53 unless ($JSON::Backend) {
54 $JSON::DEBUG and Carp::carp("Check used worker module...");
58 if ($backend eq '1' or $backend =~ /JSON::XS\s*,\s*JSON::PP/) {
85 JSON::Backend::XS
86 ->support_by_pp(@PPOnlyMethods) if ($JSON::Backend eq $Module_XS);
[all …]
/external/chromium_org/third_party/JSON/JSON-2.59/blib/lib/
DJSON.pm1 package JSON; package
7 @JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
10 $JSON::VERSION = '2.59';
11 $JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
12 $JSON::DEBUG = $ENV{ PERL_JSON_DEBUG } if exists $ENV{ PERL_JSON_DEBUG };
53 unless ($JSON::Backend) {
54 $JSON::DEBUG and Carp::carp("Check used worker module...");
58 if ($backend eq '1' or $backend =~ /JSON::XS\s*,\s*JSON::PP/) {
85 JSON::Backend::XS
86 ->support_by_pp(@PPOnlyMethods) if ($JSON::Backend eq $Module_XS);
[all …]
/external/chromium_org/third_party/JSON/JSON-2.59/lib/
DJSON.pm1 package JSON; package
7 @JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
10 $JSON::VERSION = '2.59';
11 $JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
12 $JSON::DEBUG = $ENV{ PERL_JSON_DEBUG } if exists $ENV{ PERL_JSON_DEBUG };
53 unless ($JSON::Backend) {
54 $JSON::DEBUG and Carp::carp("Check used worker module...");
58 if ($backend eq '1' or $backend =~ /JSON::XS\s*,\s*JSON::PP/) {
85 JSON::Backend::XS
86 ->support_by_pp(@PPOnlyMethods) if ($JSON::Backend eq $Module_XS);
[all …]
/external/chromium_org/v8/test/mjsunit/
Djson.js46 assertTrue(Object.prototype === JSON.__proto__);
47 assertEquals("[object JSON]", Object.prototype.toString.call(JSON));
92 assertEquals({}, JSON.parse("{}"));
93 assertEquals({42:37}, JSON.parse('{"42":37}'));
94 assertEquals(null, JSON.parse("null"));
95 assertEquals(true, JSON.parse("true"));
96 assertEquals(false, JSON.parse("false"));
97 assertEquals("foo", JSON.parse('"foo"'));
98 assertEquals("f\no", JSON.parse('"f\\no"'));
100 JSON.parse('"\\b\\f\\n\\r\\t\\"\\u2028\\/\\\\"'));
[all …]
/external/chromium_org/third_party/JSON/JSON-2.59/
DChanges1 Revision history for Perl extension JSON.
3 ## JSON version 2.xx #####################################################
5 From version 1.xx to 2.xx, JSON was totally rewritten.
7 * JSON becomes a wrapper to JSON::XS or JSON::PP!
9 * $JSON::* variables are no longer available!
10 * JSON::Parser and JSON::Converter are deleted from the distribution!
12 Please check JSON::RPC (supports JSON-RPC protocol v1.1 and 1.0).
19 - recommend JSON::XS instead of conditionally requiring it
21 ( for example, $ cpanm --with-recommends JSON)
28 - stop installing JSON::XS automatically on Perl 5.18
[all …]
DREADME1 JSON version 2.58
4 "JSON::PP" was earlier included in the "JSON" distribution,
6 "JSON::PP" was removed from the "JSON" distribution and can
11 (The newest "JSON::PP" version still exists in CPAN.)
13 Instead, the "JSON" distribution will include "JSON::backportPP"
14 for backwards computability. JSON.pm should thus work as it did before.
27 if you use cpanm, can install JSON::XS at once.
29 cpanm --with-recommends JSON
33 JSON - JSON (JavaScript Object Notation) encoder/decoder
36 use JSON; # imports encode_json, decode_json, to_json and from_json.
[all …]
/external/chromium_org/third_party/JSON/JSON-2.59/t/
Dx02_error.t15 use JSON;
18 skip "can't use JSON::XS.", 31, unless( JSON->backend->is_xs );
20 eval { JSON->new->encode ([\-1]) }; ok $@ =~ /cannot encode reference/;
21 eval { JSON->new->encode ([\undef]) }; ok $@ =~ /cannot encode reference/;
22 eval { JSON->new->encode ([\2]) }; ok $@ =~ /cannot encode reference/;
23 eval { JSON->new->encode ([\{}]) }; ok $@ =~ /cannot encode reference/;
24 eval { JSON->new->encode ([\[]]) }; ok $@ =~ /cannot encode reference/;
25 eval { JSON->new->encode ([\\1]) }; ok $@ =~ /cannot encode reference/;
27 eval { JSON->new->allow_nonref (1)->decode ('"\u1234\udc00"') }; ok $@ =~ /missing high /;
28 eval { JSON->new->allow_nonref->decode ('"\ud800"') }; ok $@ =~ /missing low /;
[all …]
D02_error.t1 # copied over from JSON::XS and modified to use JSON
7 BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
15 use JSON;
18 eval { JSON->new->encode ([\-1]) }; ok $@ =~ /cannot encode reference/;
19 eval { JSON->new->encode ([\undef]) }; ok $@ =~ /cannot encode reference/;
20 eval { JSON->new->encode ([\2]) }; ok $@ =~ /cannot encode reference/;
21 eval { JSON->new->encode ([\{}]) }; ok $@ =~ /cannot encode reference/;
22 eval { JSON->new->encode ([\[]]) }; ok $@ =~ /cannot encode reference/;
23 eval { JSON->new->encode ([\\1]) }; ok $@ =~ /cannot encode reference/;
24 eval { JSON->new->allow_nonref (1)->decode ('"\u1234\udc00"') }; ok $@ =~ /missing high /;
[all …]
D03_types.t1 # copied over from JSON::XS and modified to use JSON
7 BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
9 use JSON;
12 ok (!defined JSON->new->allow_nonref (1)->decode ('null'));
13 ok (JSON->new->allow_nonref (1)->decode ('true') == 1);
14 ok (JSON->new->allow_nonref (1)->decode ('false') == 0);
16 my $true = JSON->new->allow_nonref (1)->decode ('true');
18 ok (JSON::is_bool $true);
19 my $false = JSON->new->allow_nonref (1)->decode ('false');
21 ok (JSON::is_bool $false);
[all …]
Dxe03_bool2.t6 use JSON;
9 skip "can't use JSON::XS.", 26, unless( JSON->backend->is_xs );
11 is(to_json([JSON::true]), q|[true]|);
12 is(to_json([JSON::false]), q|[false]|);
13 is(to_json([JSON::null]), q|[null]|);
18 isa_ok($obj->[0], 'JSON::Boolean');
19 isa_ok($obj->[1], 'JSON::Boolean');
35 ok(JSON::true eq 'true');
36 ok(JSON::true ne 'false');
37 ok(JSON::true ne 'null');
[all …]
De03_bool2.t5 BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
6 use JSON;
8 is(to_json([JSON::true]), q|[true]|);
9 is(to_json([JSON::false]), q|[false]|);
10 is(to_json([JSON::null]), q|[null]|);
15 isa_ok($obj->[0], 'JSON::Boolean');
16 isa_ok($obj->[1], 'JSON::Boolean');
32 ok(JSON::true eq 'true');
33 ok(JSON::true ne 'false');
34 ok(JSON::true ne 'null');
[all …]
D99_binary.t1 # copied over from JSON::XS and modified to use JSON
7 BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
14 use JSON;
17 skip "UNICODE handling is disabale.", 2432 unless $JSON::can_handle_UTF16_and_utf8;
22 $js = JSON->new->allow_nonref(0)->utf8->ascii->shrink->encode ([$_[0]]);
24 $js = JSON->new->allow_nonref(0)->utf8->ascii->encode ([$_[0]]);
25 ok ($_[0] eq (JSON->new->utf8->shrink->decode($js))->[0]);
27 $js = JSON->new->allow_nonref(0)->utf8->shrink->encode ([$_[0]]);
29 $js = JSON->new->allow_nonref(1)->utf8->encode ([$_[0]]);
30 ok ($_[0] eq (JSON->new->utf8->shrink->decode($js))->[0]);
[all …]
D01_utf8.t1 # copied over from JSON::XS and modified to use JSON
7 BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
16 use JSON;
19 ok (JSON->new->allow_nonref (1)->utf8 (1)->encode ("ü") eq "\"\xc3\xbc\"");
20 ok (JSON->new->allow_nonref (1)->encode ("ü") eq "\"ü\"");
23 skip "UNICODE handling is disabale.", 7 unless $JSON::can_handle_UTF16_and_utf8;
25 ok (JSON->new->allow_nonref (1)->ascii (1)->utf8 (1)->encode (chr 0x8000) eq '"\u8000"');
26 ok (JSON->new->allow_nonref (1)->ascii (1)->utf8 (1)->pretty (1)->encode (chr 0x10402) eq "\"\\ud80…
28 eval { JSON->new->allow_nonref (1)->utf8 (1)->decode ('"ü"') };
31 ok (JSON->new->allow_nonref (1)->decode ('"ü"') eq "ü");
[all …]
Dxe02_bool.t11 use JSON;
14 skip "can't use JSON::XS.", 11, unless( JSON->backend->is_xs );
16 my $json = new JSON;
27 ok(JSON::true eq 'true');
28 ok(JSON::true eq '1');
29 ok(JSON::true == 1);
30 isa_ok(JSON::true, JSON->backend . '::Boolean');
31 isa_ok(JSON::true, 'JSON::Boolean');
De02_bool.t9 BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
11 use JSON;
13 my $json = new JSON;
25 ok(JSON::true eq 'true');
26 ok(JSON::true eq '1');
27 ok(JSON::true == 1);
28 isa_ok(JSON::true, JSON->backend . '::Boolean');
29 isa_ok(JSON::true, 'JSON::Boolean');
Dx17_strange_overload.t9 use JSON::XS;
10 use JSON ();
13 skip "can't use JSON::XS.", 2, if $@;
14 skip "JSON::XS version < " . JSON->require_xs_version, 2
15 if JSON::XS->VERSION < JSON->require_xs_version;
17 is("" . JSON::XS::true(), 'true');
18 is("" . JSON::true(), 'true');
De90_misc.t6 $ENV{ PERL_JSON_BACKEND } = $ARGV[0] || 'JSON::backportPP';
9 use JSON;
13 eval { JSON->to_json( 5, { allow_nonref => 1 } ) };
16 is( q{"5"}, JSON::to_json( "5", { allow_nonref => 1 } ) );
17 is( q{5}, JSON::to_json( 5, { allow_nonref => 1 } ) );
18 is( q{"JSON"}, JSON::to_json( 'JSON', { allow_nonref => 1 } ) );
/external/chromium_org/third_party/JSON/out/lib/perl5/x86_64-linux-gnu-thread-multi/auto/JSON/
D.packlist1 /w/chr/src/third_party/JSON/out/lib/perl5/JSON.pm
2 /w/chr/src/third_party/JSON/out/lib/perl5/JSON/backportPP.pm
3 /w/chr/src/third_party/JSON/out/lib/perl5/JSON/backportPP/Boolean.pm
4 /w/chr/src/third_party/JSON/out/lib/perl5/JSON/backportPP/Compat5005.pm
5 /w/chr/src/third_party/JSON/out/lib/perl5/JSON/backportPP/Compat5006.pm
6 /w/chr/src/third_party/JSON/out/man/man3/JSON.3pm
7 /w/chr/src/third_party/JSON/out/man/man3/JSON::backportPP.3pm
8 /w/chr/src/third_party/JSON/out/man/man3/JSON::backportPP::Boolean.3pm
9 /w/chr/src/third_party/JSON/out/man/man3/JSON::backportPP::Compat5005.3pm
10 /w/chr/src/third_party/JSON/out/man/man3/JSON::backportPP::Compat5006.3pm
[all …]
/external/chromium_org/v8/test/webkit/
DJSON-stringify-replacer-expected.txt24 Test to ensure correct behaviour of replacer functions in JSON.stringify
29 PASS JSON.stringify(object, returnUndefined) is undefined.
30 PASS JSON.stringify(array, returnUndefined) is undefined.
31 PASS JSON.stringify(object, returnObjectFor1) is '{"0":0,"1":{},"2":2}'
32 PASS JSON.stringify(array, returnObjectFor1) is '[0,{},2,null]'
33 PASS JSON.stringify(object, returnArrayFor1) is '{"0":0,"1":[],"2":2}'
34 PASS JSON.stringify(array, returnArrayFor1) is '[0,[],2,null]'
35 PASS JSON.stringify(object, returnUndefinedFor1) is '{"0":0,"2":2}'
36 PASS JSON.stringify(array, returnUndefinedFor1) is '[0,null,2,null]'
37 PASS JSON.stringify(object, returnFunctionFor1) is '{"0":0,"2":2}'
[all …]
/external/chromium_org/third_party/JSON/JSON-2.59/eg/
Dbench_decode.pl11 use JSON qw( -support_by_pp -no_export ); # for JSON::PP::Boolean inheritance
12 use JSON::PP ();
13 use JSON::XS ();
16 my $pp = JSON::PP->new->utf8;
17 my $xs = JSON::XS->new->utf8;
22 my $perl = JSON::XS::decode_json $json;
26 printf( "JSON::PP %s\n", JSON::PP->VERSION );
27 printf( "JSON::XS %s\n", JSON::XS->VERSION );
Dbench_encode.pl11 use JSON qw( -support_by_pp -no_export ); # for JSON::PP::Boolean inheritance
12 use JSON::PP ();
13 use JSON::XS ();
16 my $pp = JSON::PP->new->utf8;
17 my $xs = JSON::XS->new->utf8;
22 my $perl = JSON::XS::decode_json $json;
26 printf( "JSON::PP %s\n", JSON::PP->VERSION );
27 printf( "JSON::XS %s\n", JSON::XS->VERSION );
/external/chromium_org/third_party/JSON/out/lib/perl5/JSON/backportPP/
DCompat5006.pm2 JSON::backportPP56;
9 $JSON::PP56::VERSION = '1.08';
69 *JSON::PP::JSON_PP_encode_ascii = \&_encode_ascii;
70 *JSON::PP::JSON_PP_encode_latin1 = \&_encode_latin1;
71 *JSON::PP::JSON_PP_decode_surrogates = \&JSON::PP::_decode_surrogates;
72 *JSON::PP::JSON_PP_decode_unicode = \&JSON::PP::_decode_unicode;
88 sprintf('\u%04x', $_) : sprintf('\u%x\u%x', JSON::PP::_encode_surrogates($_));
100 sprintf('\u%04x', $_) : sprintf('\u%x\u%x', JSON::PP::_encode_surrogates($_));
/external/chromium_org/third_party/JSON/JSON-2.59/lib/JSON/backportPP/
DCompat5006.pm2 JSON::backportPP56;
9 $JSON::PP56::VERSION = '1.08';
69 *JSON::PP::JSON_PP_encode_ascii = \&_encode_ascii;
70 *JSON::PP::JSON_PP_encode_latin1 = \&_encode_latin1;
71 *JSON::PP::JSON_PP_decode_surrogates = \&JSON::PP::_decode_surrogates;
72 *JSON::PP::JSON_PP_decode_unicode = \&JSON::PP::_decode_unicode;
88 sprintf('\u%04x', $_) : sprintf('\u%x\u%x', JSON::PP::_encode_surrogates($_));
100 sprintf('\u%04x', $_) : sprintf('\u%x\u%x', JSON::PP::_encode_surrogates($_));
/external/chromium_org/third_party/JSON/JSON-2.59/blib/lib/JSON/backportPP/
DCompat5006.pm2 JSON::backportPP56;
9 $JSON::PP56::VERSION = '1.08';
69 *JSON::PP::JSON_PP_encode_ascii = \&_encode_ascii;
70 *JSON::PP::JSON_PP_encode_latin1 = \&_encode_latin1;
71 *JSON::PP::JSON_PP_decode_surrogates = \&JSON::PP::_decode_surrogates;
72 *JSON::PP::JSON_PP_decode_unicode = \&JSON::PP::_decode_unicode;
88 sprintf('\u%04x', $_) : sprintf('\u%x\u%x', JSON::PP::_encode_surrogates($_));
100 sprintf('\u%04x', $_) : sprintf('\u%x\u%x', JSON::PP::_encode_surrogates($_));

12345678910>>...20