r54721 - in /trunk/libjson-perl: Changes MANIFEST META.yml Makefile.PL README debian/changelog debian/control debian/source/ debian/source/format lib/JSON.pm lib/JSON/PP.pm t/e13_overloaded_eq.t
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Wed Mar 24 11:42:17 UTC 2010
Author: eloy
Date: Wed Mar 24 11:42:06 2010
New Revision: 54721
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=54721
Log:
new upstream version
Added:
trunk/libjson-perl/debian/source/
trunk/libjson-perl/debian/source/format
trunk/libjson-perl/t/e13_overloaded_eq.t
- copied unchanged from r54720, branches/upstream/libjson-perl/current/t/e13_overloaded_eq.t
Modified:
trunk/libjson-perl/Changes
trunk/libjson-perl/MANIFEST
trunk/libjson-perl/META.yml
trunk/libjson-perl/Makefile.PL
trunk/libjson-perl/README
trunk/libjson-perl/debian/changelog
trunk/libjson-perl/debian/control
trunk/libjson-perl/lib/JSON.pm
trunk/libjson-perl/lib/JSON/PP.pm
Modified: trunk/libjson-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/Changes?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/Changes (original)
+++ trunk/libjson-perl/Changes Wed Mar 24 11:42:06 2010
@@ -15,6 +15,13 @@
!! Since 2.16, PP's relaxed option caused an infinite loop in some condition.
!! Recommend to update old versions.
+
+2.18 Tue Mar 23 15:18:10 2010
+ [JSON]
+ - updated document (compatible with JSON::XS 2.29)
+ [JSON::PP]
+ - fixed encode an overloaded 'eq' object bug (reported by Alexey A. Kiritchun)
+ - enhanced an error message compatible to JSON::XS
2.17 Thu Jan 7 12:23:13 2010
[JSON]
Modified: trunk/libjson-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/MANIFEST?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/MANIFEST (original)
+++ trunk/libjson-perl/MANIFEST Wed Mar 24 11:42:06 2010
@@ -1,15 +1,14 @@
Changes
lib/JSON.pm
lib/JSON/PP.pm
+lib/JSON/PP/Boolean.pm
+lib/JSON/PP5005.pm
+lib/JSON/PP56.pm
lib/JSON/PP58.pm
-lib/JSON/PP56.pm
-lib/JSON/PP5005.pm
-lib/JSON/PP/Boolean.pm
Makefile.PL
MANIFEST
+META.yml Module meta-data (added by MakeMaker)
README
-
-t/_unicode_handling.pm
t/00_load.t
t/00_pod.t
t/01_utf8.t
@@ -33,7 +32,7 @@
t/21_evans_bugrep.t
t/22_comment_at_eof.t
t/99_binary.t
-
+t/_unicode_handling.pm
t/e00_func.t
t/e01_property.t
t/e02_bool.t
@@ -47,7 +46,7 @@
t/e10_bignum.t
t/e11_conv_blessed_univ.t
t/e12_upgrade.t
-
+t/e13_overloaded_eq.t
t/x00_load.t
t/x02_error.t
t/x12_blessed.t
@@ -61,5 +60,3 @@
t/xe10_bignum.t
t/xe11_conv_blessed_univ.t
t/xe12_boolean.t
-
-META.yml Module meta-data (added by MakeMaker)
Modified: trunk/libjson-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/META.yml?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/META.yml (original)
+++ trunk/libjson-perl/META.yml Wed Mar 24 11:42:06 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: JSON
-version: 2.17
+version: 2.18
abstract: JSON (JavaScript Object Notation) encoder/decoder
author:
- Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>
@@ -8,13 +8,17 @@
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
Test::More: 0
+resources:
+ repository: http://github.com/makamaka/JSON
no_index:
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.48
+generated_by: ExtUtils::MakeMaker version 6.54
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Modified: trunk/libjson-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/Makefile.PL?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/Makefile.PL (original)
+++ trunk/libjson-perl/Makefile.PL Wed Mar 24 11:42:06 2010
@@ -68,6 +68,14 @@
(ABSTRACT_FROM => 'lib/JSON.pm', # retrieve abstract from module
AUTHOR => 'Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>') : ()),
( $ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE' => 'perl', ) : () ),
+
+ ( $ExtUtils::MakeMaker::VERSION >= 6.46 ? (
+ 'META_MERGE' => {
+ resources => {
+ repository => 'http://github.com/makamaka/JSON',
+ },
+ } ) : ()
+ ),
);
Modified: trunk/libjson-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/README?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/README (original)
+++ trunk/libjson-perl/README Wed Mar 24 11:42:06 2010
@@ -1,4 +1,4 @@
-JSON version 2.17
+JSON version 2.18
=================
INSTALLATION
@@ -42,7 +42,7 @@
use JSON -support_by_pp;
VERSION
- 2.17
+ 2.18
This version is compatible with JSON::XS 2.27 and later.
@@ -102,10 +102,11 @@
* round-trip integrity
When you serialise a perl data structure using only data types
- supported by JSON, the deserialised data structure is identical on
- the Perl level. (e.g. the string "2.0" doesn't suddenly become "2"
- just because it looks like a number). There minor *are* exceptions
- to this, read the MAPPING section below to learn about those.
+ supported by JSON and Perl, the deserialised data structure is
+ identical on the Perl level. (e.g. the string "2.0" doesn't suddenly
+ become "2" just because it looks like a number). There *are* minor
+ exceptions to this, read the "MAPPING" section below to learn about
+ those.
* strict checking of JSON correctness
There is no guessing, no generating of illegal JSON texts by
@@ -957,6 +958,11 @@
of precision (in which case you might lose perfect roundtripping
ability, but the JSON number will still be re-encoded as a JSON
number).
+
+ Note that precision is not accuracy - binary floating point values
+ cannot represent most decimal fractions exactly, and when converting
+ from and to floating point, "JSON" only guarantees precision up to
+ but not including the leats significant bit.
If the backend is JSON::PP and "allow_bignum" is enable, the big
integers and the numeric can be optionally converted into
@@ -1074,6 +1080,13 @@
You can not currently force the type in other, less obscure, ways.
+ Note that numerical precision has the same meaning as under Perl (so
+ binary to decimal conversion follows the same rules as in Perl,
+ which can differ to other languages). Also, your perl interpreter
+ might expose extensions to the floating point numbers of your
+ platform, such as infinities or NaN's - these cannot be represented
+ in JSON, and it is an error to pass those in.
+
Big Number
If the backend is JSON::PP and "allow_bignum" is enable, "encode"
converts "Math::BigInt" objects and "Math::BigFloat" objects into
@@ -1153,8 +1166,8 @@
At this time, the returned object is a "JSON::Backend::XS::Supportable"
object (re-blessed XS object), and by checking JSON::XS unsupported
flags in de/encoding, can support some unsupported methods - "loose",
- "allow_bignum", "allow_barekey", "allow_singlequote", "escape_slash",
- "as_nonblessed" and "indent_length".
+ "allow_bignum", "allow_barekey", "allow_singlequote", "escape_slash" and
+ "indent_length".
When any unsupported methods are not enable, "XS de/encode" will be used
as is. The switch is achieved by changing the symbolic tables.
@@ -1370,8 +1383,7 @@
The relese of this new version owes to the courtesy of Marc Lehmann.
COPYRIGHT AND LICENSE
- Copyright 2005-2009 by Makamaka Hannyaharamitu
+ Copyright 2005-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
-
Modified: trunk/libjson-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/debian/changelog?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/debian/changelog (original)
+++ trunk/libjson-perl/debian/changelog Wed Mar 24 11:42:06 2010
@@ -1,3 +1,12 @@
+libjson-perl (2.18-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * debian/control: Added me to Uploaders, Standards-Version updated to 3.8.4
+ without any changes
+ * debian/source/format created as "3.0 quilt"
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Wed, 24 Mar 2010 12:36:35 +0100
+
libjson-perl (2.17-1) unstable; urgency=low
[ gregor herrmann ]
Modified: trunk/libjson-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/debian/control?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/debian/control (original)
+++ trunk/libjson-perl/debian/control Wed Mar 24 11:42:06 2010
@@ -7,8 +7,9 @@
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Angel Abad <angelabad at gmail.com>,
Ivan Kohler <ivan-debian at 420.am>,
- Ansgar Burchardt <ansgar at 43-1.org>, Nathan Handler <nhandler at ubuntu.com>
-Standards-Version: 3.8.3
+ Ansgar Burchardt <ansgar at 43-1.org>, Nathan Handler <nhandler at ubuntu.com>,
+ Krzysztof Krzyżaniak (eloy) <eloy at debian.org>
+Standards-Version: 3.8.4
Homepage: http://search.cpan.org/dist/JSON/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libjson-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libjson-perl/
Added: trunk/libjson-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/debian/source/format?rev=54721&op=file
==============================================================================
--- trunk/libjson-perl/debian/source/format (added)
+++ trunk/libjson-perl/debian/source/format Wed Mar 24 11:42:06 2010
@@ -1,0 +1,1 @@
+3.0 quilt
Modified: trunk/libjson-perl/lib/JSON.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/lib/JSON.pm?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/lib/JSON.pm (original)
+++ trunk/libjson-perl/lib/JSON.pm Wed Mar 24 11:42:06 2010
@@ -7,7 +7,7 @@
@JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
BEGIN {
- $JSON::VERSION = '2.17';
+ $JSON::VERSION = '2.18';
$JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
}
@@ -607,7 +607,7 @@
=head1 VERSION
- 2.17
+ 2.18
This version is compatible with JSON::XS B<2.27> and later.
@@ -669,11 +669,12 @@
=item * round-trip integrity
-When you serialise a perl data structure using only data types supported by JSON,
-the deserialised data structure is identical on the Perl level.
-(e.g. the string "2.0" doesn't suddenly become "2" just because it looks
-like a number). There minor I<are> exceptions to this, read the MAPPING
-section below to learn about those.
+When you serialise a perl data structure using only data types supported
+by JSON and Perl, the deserialised data structure is identical on the Perl
+level. (e.g. the string "2.0" doesn't suddenly become "2" just because
+it looks like a number). There I<are> minor exceptions to this, read the
+L</MAPPING> section below to learn about those.
+
=item * strict checking of JSON correctness
@@ -1594,6 +1595,11 @@
represented as numeric (floating point) values, possibly at a loss of
precision (in which case you might lose perfect roundtripping ability, but
the JSON number will still be re-encoded as a JSON number).
+
+Note that precision is not accuracy - binary floating point values cannot
+represent most decimal fractions exactly, and when converting from and to
+floating point, C<JSON> only guarantees precision up to but not including
+the leats significant bit.
If the backend is JSON::PP and C<allow_bignum> is enable, the big integers
and the numeric can be optionally converted into L<Math::BigInt> and
@@ -1724,6 +1730,13 @@
You can not currently force the type in other, less obscure, ways.
+Note that numerical precision has the same meaning as under Perl (so
+binary to decimal conversion follows the same rules as in Perl, which
+can differ to other languages). Also, your perl interpreter might expose
+extensions to the floating point numbers of your platform, such as
+infinities or NaN's - these cannot be represented in JSON, and it is an
+error to pass those in.
+
=item Big Number
If the backend is JSON::PP and C<allow_bignum> is enable,
@@ -1817,8 +1830,7 @@
At this time, the returned object is a C<JSON::Backend::XS::Supportable>
object (re-blessed XS object), and by checking JSON::XS unsupported flags
in de/encoding, can support some unsupported methods - C<loose>, C<allow_bignum>,
-C<allow_barekey>, C<allow_singlequote>, C<escape_slash>, C<as_nonblessed>
-and C<indent_length>.
+C<allow_barekey>, C<allow_singlequote>, C<escape_slash> and C<indent_length>.
When any unsupported methods are not enable, C<XS de/encode> will be
used as is. The switch is achieved by changing the symbolic tables.
Modified: trunk/libjson-perl/lib/JSON/PP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-perl/lib/JSON/PP.pm?rev=54721&op=diff
==============================================================================
--- trunk/libjson-perl/lib/JSON/PP.pm (original)
+++ trunk/libjson-perl/lib/JSON/PP.pm Wed Mar 24 11:42:06 2010
@@ -11,7 +11,7 @@
use B ();
#use Devel::Peek;
-$JSON::PP::VERSION = '2.27000';
+$JSON::PP::VERSION = '2.27001';
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
@@ -323,12 +323,15 @@
if ( $convert_blessed and $obj->can('TO_JSON') ) {
my $result = $obj->TO_JSON();
- if ( defined $result and $obj eq $result ) {
- encode_error( sprintf(
- "%s::TO_JSON method returned same object as was passed instead of a new one",
- ref $obj
- ) );
+ if ( defined $result and overload::Overloaded( $obj ) ) {
+ if ( overload::StrVal( $obj ) eq $result ) {
+ encode_error( sprintf(
+ "%s::TO_JSON method returned same object as was passed instead of a new one",
+ ref $obj
+ ) );
+ }
}
+
return $self->object_to_json( $result );
}
@@ -819,6 +822,7 @@
}
else{
unless ($loose) {
+ $at -= 2;
decode_error('illegal backslash escape sequence in string');
}
$s .= $ch;
@@ -1216,6 +1220,7 @@
: $c == 0x0d ? '\r'
: $c == 0x0c ? '\f'
: $c < 0x20 ? sprintf('\x{%x}', $c)
+ : $c == 0x5c ? '\\\\'
: $c < 0x80 ? chr($c)
: sprintf('\x{%x}', $c)
;
@@ -1566,9 +1571,12 @@
=item * round-trip integrity
-When you serialise a perl data structure using only datatypes supported by JSON,
-the deserialised data structure is identical on the Perl level.
-(e.g. the string "2.0" doesn't suddenly become "2" just because it looks like a number).
+When you serialise a perl data structure using only data types supported
+by JSON and Perl, the deserialised data structure is identical on the Perl
+level. (e.g. the string "2.0" doesn't suddenly become "2" just because
+it looks like a number). There I<are> minor exceptions to this, read the
+MAPPING section below to learn about those.
+
=item * strict checking of JSON correctness
More information about the Pkg-perl-cvs-commits
mailing list