r45898 - in /branches/upstream/libjson-perl/current: Changes MANIFEST META.yml README lib/JSON.pm lib/JSON/PP.pm lib/JSON/PP58.pm t/01_utf8.t t/04_pretty.t t/06_pc_pretty.t t/xe05_indent_length.t
angelabad-guest at users.alioth.debian.org
angelabad-guest at users.alioth.debian.org
Sat Oct 17 09:16:39 UTC 2009
Author: angelabad-guest
Date: Sat Oct 17 09:16:18 2009
New Revision: 45898
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45898
Log:
[svn-upgrade] Integrating new upstream version, libjson-perl (2.16)
Removed:
branches/upstream/libjson-perl/current/t/04_pretty.t
Modified:
branches/upstream/libjson-perl/current/Changes
branches/upstream/libjson-perl/current/MANIFEST
branches/upstream/libjson-perl/current/META.yml
branches/upstream/libjson-perl/current/README
branches/upstream/libjson-perl/current/lib/JSON.pm
branches/upstream/libjson-perl/current/lib/JSON/PP.pm
branches/upstream/libjson-perl/current/lib/JSON/PP58.pm
branches/upstream/libjson-perl/current/t/01_utf8.t
branches/upstream/libjson-perl/current/t/06_pc_pretty.t
branches/upstream/libjson-perl/current/t/xe05_indent_length.t
Modified: branches/upstream/libjson-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/Changes?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/Changes (original)
+++ branches/upstream/libjson-perl/current/Changes Sat Oct 17 09:16:18 2009
@@ -12,6 +12,12 @@
Please check JSON::RPC (supports JSON-RPC protocol v1.1 and 1.0).
##########################################################################
+
+2.16 Fri Oct 16 15:07:37 2009
+ [JSON][JSON::PP]
+ - made compatible with JSON::XS 2.26
+ *indent adds a final newline
+ - corrected copyrights in JSON::PP58.
2.15 Tue Jun 2 16:36:42 2009
[JSON]
Modified: branches/upstream/libjson-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/MANIFEST?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/MANIFEST (original)
+++ branches/upstream/libjson-perl/current/MANIFEST Sat Oct 17 09:16:18 2009
@@ -15,7 +15,6 @@
t/01_utf8.t
t/02_error.t
t/03_types.t
-t/04_pretty.t
t/06_pc_pretty.t
t/07_pc_esc.t
t/08_pc_base.t
Modified: branches/upstream/libjson-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/META.yml?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/META.yml (original)
+++ branches/upstream/libjson-perl/current/META.yml Sat Oct 17 09:16:18 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: JSON
-version: 2.15
+version: 2.16
abstract: JSON (JavaScript Object Notation) encoder/decoder
author:
- Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>
Modified: branches/upstream/libjson-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/README?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/README (original)
+++ branches/upstream/libjson-perl/current/README Sat Oct 17 09:16:18 2009
@@ -1,4 +1,4 @@
-JSON version 2.15
+JSON version 2.16
=================
INSTALLATION
@@ -42,9 +42,9 @@
use JSON -support_by_pp;
VERSION
- 2.13
-
- This version is compatible with JSON::XS 2.21.
+ 2.16
+
+ This version is compatible with JSON::XS 2.26 and later.
DESCRIPTION
************************** CAUTION ********************************
@@ -681,8 +681,9 @@
to a hash or array) to its JSON representation. Simple scalars will be
converted into JSON string or number sequences, while references to
arrays become JSON arrays and references to hashes become JSON objects.
- Undefined Perl values (e.g. "undef") become JSON "null" values. Neither
- "true" nor "false" values will be generated.
+ Undefined Perl values (e.g. "undef") become JSON "null" values.
+ References to the integers 0 and 1 are converted into "true" and
+ "false".
decode
$perl_scalar = $json->decode($json_text)
@@ -691,8 +692,9 @@
returning the resulting simple scalar or reference. Croaks on error.
JSON numbers and strings become simple Perl scalars. JSON arrays become
- Perl arrayrefs and JSON objects become Perl hashrefs. "true" becomes 1,
- "false" becomes 0 and "null" becomes "undef".
+ Perl arrayrefs and JSON objects become Perl hashrefs. "true" becomes 1
+ ("JSON::true"), "false" becomes 0 ("JSON::false") and "null" becomes
+ "undef".
decode_prefix
($perl_scalar, $characters) = $json->decode_prefix($json_text)
@@ -1077,6 +1079,9 @@
converts "Math::BigInt" objects and "Math::BigFloat" objects into
JSON numbers.
+JSON and ECMAscript
+ See to "JSON and ECMAscript" in JSON::XS.
+
JSON and YAML
JSON is not a subset of YAML. See to "JSON and YAML" in JSON::XS.
@@ -1140,7 +1145,7 @@
makes a part of those unupported methods available. This feature is
achieved by using JSON::PP in "de/encode".
- BEING { $ENV{PERL_JSON_BACKEND} = 2 } # with JSON::XS
+ BEGIN { $ENV{PERL_JSON_BACKEND} = 2 } # with JSON::XS
use JSON -support_by_pp;
my $json = new JSON;
$json->allow_nonref->escape_slash->encode("/");
@@ -1365,7 +1370,7 @@
The relese of this new version owes to the courtesy of Marc Lehmann.
COPYRIGHT AND LICENSE
- Copyright 2005-2008 by Makamaka Hannyaharamitu
+ Copyright 2005-2009 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: branches/upstream/libjson-perl/current/lib/JSON.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/lib/JSON.pm?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/lib/JSON.pm (original)
+++ branches/upstream/libjson-perl/current/lib/JSON.pm Sat Oct 17 09:16:18 2009
@@ -7,13 +7,13 @@
@JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
BEGIN {
- $JSON::VERSION = '2.15';
+ $JSON::VERSION = '2.16';
$JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
}
my $Module_XS = 'JSON::XS';
my $Module_PP = 'JSON::PP';
-my $XS_Version = '2.24';
+my $XS_Version = '2.26';
# XS and PP common methods
@@ -586,9 +586,9 @@
=head1 VERSION
- 2.15
-
-This version is compatible with JSON::XS B<2.24> and later.
+ 2.16
+
+This version is compatible with JSON::XS B<2.26> and later.
=head1 DESCRIPTION
Modified: branches/upstream/libjson-perl/current/lib/JSON/PP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/lib/JSON/PP.pm?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/lib/JSON/PP.pm (original)
+++ branches/upstream/libjson-perl/current/lib/JSON/PP.pm Sat Oct 17 09:16:18 2009
@@ -11,7 +11,7 @@
use B ();
#use Devel::Peek;
-$JSON::PP::VERSION = '2.24000';
+$JSON::PP::VERSION = '2.26000';
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
@@ -291,6 +291,8 @@
if(!ref $obj and !$idx->[ P_ALLOW_NONREF ]);
my $str = $self->object_to_json($obj);
+
+ $str .= "\n" if ( $indent ); # JSON::XS 2.26 compatible
unless ($ascii or $latin1 or $utf8) {
utf8::upgrade($str);
Modified: branches/upstream/libjson-perl/current/lib/JSON/PP58.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/lib/JSON/PP58.pm?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/lib/JSON/PP58.pm (original)
+++ branches/upstream/libjson-perl/current/lib/JSON/PP58.pm Sat Oct 17 09:16:18 2009
@@ -5,7 +5,7 @@
my @properties;
-$JSON::PP58::VERSION = '1.02';
+$JSON::PP58::VERSION = '1.03';
BEGIN {
@@ -84,7 +84,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2008 by Makamaka Hannyaharamitu
+Copyright 2008-2009 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: branches/upstream/libjson-perl/current/t/01_utf8.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/t/01_utf8.t?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/t/01_utf8.t (original)
+++ branches/upstream/libjson-perl/current/t/01_utf8.t Sat Oct 17 09:16:18 2009
@@ -23,8 +23,8 @@
skip "UNICODE handling is disabale.", 7 unless $JSON::can_handle_UTF16_and_utf8;
ok (JSON->new->allow_nonref (1)->ascii (1)->utf8 (1)->encode (chr 0x8000) eq '"\u8000"');
-ok (JSON->new->allow_nonref (1)->ascii (1)->utf8 (1)->pretty (1)->encode (chr 0x10402) eq '"\ud801\udc02"');
-#print JSON->new->allow_nonref (1)->ascii (1)->utf8 (1)->pretty (1)->encode (chr 0x12345), "\n";
+ok (JSON->new->allow_nonref (1)->ascii (1)->utf8 (1)->pretty (1)->encode (chr 0x10402) eq "\"\\ud801\\udc02\"\n");
+
eval { JSON->new->allow_nonref (1)->utf8 (1)->decode ('"ü"') };
ok $@ =~ /malformed UTF-8/;
Modified: branches/upstream/libjson-perl/current/t/06_pc_pretty.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/t/06_pc_pretty.t?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/t/06_pc_pretty.t (original)
+++ branches/upstream/libjson-perl/current/t/06_pc_pretty.t Sat Oct 17 09:16:18 2009
@@ -27,7 +27,8 @@
{
"foo" : "bar"
}
-]|);
+]
+|);
$obj = { foo => [ {a=>"b"}, 0, 1, 2 ] };
$pc->pretty(0);
@@ -47,7 +48,8 @@
1,
2
]
-}|);
+}
+|);
$obj = { foo => [ {a=>"b"}, 0, 1, 2 ] };
$pc->pretty(0);
@@ -57,11 +59,11 @@
$obj = {foo => "bar"};
$pc->indent(3); # original -- $pc->indent(1);
-is($pc->encode($obj), qq|{\n "foo":"bar"\n}|, "nospace");
+is($pc->encode($obj), qq|{\n "foo":"bar"\n}\n|, "nospace");
$pc->space_after(1);
-is($pc->encode($obj), qq|{\n "foo": "bar"\n}|, "after");
+is($pc->encode($obj), qq|{\n "foo": "bar"\n}\n|, "after");
$pc->space_before(1);
-is($pc->encode($obj), qq|{\n "foo" : "bar"\n}|, "both");
+is($pc->encode($obj), qq|{\n "foo" : "bar"\n}\n|, "both");
$pc->space_after(0);
-is($pc->encode($obj), qq|{\n "foo" :"bar"\n}|, "before");
+is($pc->encode($obj), qq|{\n "foo" :"bar"\n}\n|, "before");
Modified: branches/upstream/libjson-perl/current/t/xe05_indent_length.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/t/xe05_indent_length.t?rev=45898&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/t/xe05_indent_length.t (original)
+++ branches/upstream/libjson-perl/current/t/xe05_indent_length.t Sat Oct 17 09:16:18 2009
@@ -21,7 +21,8 @@
},
"1",
"/"
-]|);
+]
+|);
is($json->escape_slash(1)->pretty->indent_length(2)->encode([1,{foo => 'bar'}, "1", "/"]), qq|[
@@ -31,7 +32,8 @@
},
"1",
"\\/"
-]|);
+]
+|);
is($json->escape_slash(1)->pretty->indent_length(3)->encode([1,{foo => 'bar'}, "1", "/"]), qq|[
@@ -41,7 +43,8 @@
},
"1",
"\\/"
-]|);
+]
+|);
is($json->escape_slash(1)->pretty->indent_length(15)->encode([1,{foo => 'bar'}, "1", "/"]), qq|[
1,
@@ -50,7 +53,8 @@
},
"1",
"\\/"
-]|);
+]
+|);
is($json->indent_length(0)->encode([1,{foo => 'bar'}, "1", "/"]), qq|[
@@ -60,7 +64,8 @@
},
"1",
"\\/"
-]|);
+]
+|);
is($json->indent(0)->space_before(0)->space_after(0)->escape_slash(0)
->encode([1,{foo => 'bar'}, "1", "/"]), qq|[1,{"foo":"bar"},"1","/"]|);
More information about the Pkg-perl-cvs-commits
mailing list