summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2020-07-11 16:17:25 +0200
committergregor herrmann <gregoa@debian.org>2020-07-11 16:17:25 +0200
commit6ba47ac9f808bee107ca648a1b54eff2e761bd10 (patch)
tree291596d5331b62288af2a3f75caf13e3b80a0708
parent4202d737e6e0232d35763fa4d24fdac2be84eddd (diff)
New upstream version 0.57
-rw-r--r--Changes4
-rw-r--r--MANIFEST2
-rw-r--r--META.json2
-rw-r--r--META.yml2
-rw-r--r--README10
-rw-r--r--json-perl.c1
-rw-r--r--lib/JSON/Parse.pm2
-rw-r--r--lib/JSON/Parse.pod40
-rw-r--r--lib/JSON/Tokenize.pm2
-rw-r--r--lib/JSON/Tokenize.pod4
-rwxr-xr-xt/string-bug-44.json1
-rwxr-xr-xt/string-bug-44.t10
12 files changed, 49 insertions, 31 deletions
diff --git a/Changes b/Changes
index 2081e79..bd06fa9 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,7 @@
+0.57 2020-07-09
+
+* Bug fix for long strings
+
0.56 2020-02-06
* Allow build on Solaris and SunOS
diff --git a/MANIFEST b/MANIFEST
index 7121017..2d3f824 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -44,6 +44,8 @@ t/object.t
t/perl-monks-1165399.t
t/read-file.t
t/rfc7159.t
+t/string-bug-44.json
+t/string-bug-44.t
t/syntax-error-1.json
t/syntax.t
t/test-empty-string.t
diff --git a/META.json b/META.json
index 43ddad7..7042d86 100644
--- a/META.json
+++ b/META.json
@@ -48,7 +48,7 @@
"web" : "https://github.com/benkasminbullock/JSON-Parse"
}
},
- "version" : "0.56",
+ "version" : "0.57",
"x_contributors" : [
"Shlomi Fish <shlomif@cpan.org>",
"kolmogorov42"
diff --git a/META.yml b/META.yml
index 83543ba..ee7485d 100644
--- a/META.yml
+++ b/META.yml
@@ -23,7 +23,7 @@ requires:
resources:
bugtracker: https://github.com/benkasminbullock/JSON-Parse/issues
repository: git://github.com/benkasminbullock/JSON-Parse.git
-version: '0.56'
+version: '0.57'
x_contributors:
- 'Shlomi Fish <shlomif@cpan.org>'
- kolmogorov42
diff --git a/README b/README
index 718a095..2294d71 100644
--- a/README
+++ b/README
@@ -6,7 +6,7 @@
-This is the README for JSON::Parse version 0.56.
+This is the README for JSON::Parse version 0.57.
JSON::Parse is a "module" for the Perl computer programming language, a
library of computer code to install on a computer. This document contains
@@ -75,11 +75,11 @@ If you have the App::cpanminus installer, you may prefer
cpanm JSON::Parse
-To install the module from the source file, JSON-Parse-0.56.tar.gz, follow
+To install the module from the source file, JSON-Parse-0.57.tar.gz, follow
this sequence of commands:
- tar xfz JSON-Parse-0.56.tar.gz
- cd JSON-Parse-0.56
+ tar xfz JSON-Parse-0.57.tar.gz
+ cd JSON-Parse-0.57
perl Makefile.PL
make
make install
@@ -104,6 +104,6 @@ repository on github at
-----------------------------------------------------------------------------
-This README was written on Mon Feb 17 13:11:05 2020.
+This README was written on Thu Jul 9 07:17:01 2020.
-----------------------------------------------------------------------------
diff --git a/json-perl.c b/json-perl.c
index 9852d9a..d1c713c 100644
--- a/json-perl.c
+++ b/json-perl.c
@@ -393,6 +393,7 @@ perl_get_string (json_parse_t * parser, STRLEN prefixlen)
/* Set the point of copying bytes back to the beginning of
buffer. We don't reset the memory in buffer. */
b = buffer;
+ size = b - buffer;
}
NEXTBYTE;
diff --git a/lib/JSON/Parse.pm b/lib/JSON/Parse.pm
index a45e46d..8efe616 100644
--- a/lib/JSON/Parse.pm
+++ b/lib/JSON/Parse.pm
@@ -17,7 +17,7 @@ require Exporter;
use warnings;
use strict;
use Carp;
-our $VERSION = '0.56';
+our $VERSION = '0.57';
require XSLoader;
XSLoader::load (__PACKAGE__, $VERSION);
diff --git a/lib/JSON/Parse.pod b/lib/JSON/Parse.pod
index 09cb809..aadd2bb 100644
--- a/lib/JSON/Parse.pod
+++ b/lib/JSON/Parse.pod
@@ -23,8 +23,8 @@ Convert JSON into Perl.
=head1 VERSION
-This documents version 0.56 of JSON::Parse corresponding to
-L<git commit c00e1e8b7dfc7958de6700700ee20582f81b56a6|https://github.com/benkasminbullock/JSON-Parse/commit/c00e1e8b7dfc7958de6700700ee20582f81b56a6> released on Mon Feb 17 13:10:15 2020 +0900.
+This documents version 0.57 of JSON::Parse corresponding to
+L<git commit 42e099ed38a3e85daed46f53bf367fa2b828e152|https://github.com/benkasminbullock/JSON-Parse/commit/42e099ed38a3e85daed46f53bf367fa2b828e152> released on Thu Jul 9 07:16:33 2020 +0900.
@@ -79,7 +79,7 @@ produces output
HASH
-(This example is included as L<F<hash.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.56/examples/hash.pl> in the distribution.)
+(This example is included as L<F<hash.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.57/examples/hash.pl> in the distribution.)
If the input JSON text is a serialized array, an array reference is
@@ -97,7 +97,7 @@ produces output
ARRAY
-(This example is included as L<F<array.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.56/examples/array.pl> in the distribution.)
+(This example is included as L<F<array.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.57/examples/array.pl> in the distribution.)
Otherwise a Perl scalar is returned.
@@ -162,7 +162,7 @@ produces output
-(This example is included as L<F<assert.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.56/examples/assert.pl> in the distribution.)
+(This example is included as L<F<assert.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.57/examples/assert.pl> in the distribution.)
This is the underlying function for L</valid_json>. It runs at the
@@ -370,7 +370,7 @@ produces output
Native Perl: かあ
-(This example is included as L<F<unicode-details.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.56/examples/unicode-details.pl> in the distribution.)
+(This example is included as L<F<unicode-details.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.57/examples/unicode-details.pl> in the distribution.)
Although in general the above would be an unsafe practice, JSON::Parse
@@ -443,7 +443,7 @@ produces output
Ambiguous key 'a' is 2
-(This example is included as L<F<key-collision.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.56/examples/key-collision.pl> in the distribution.)
+(This example is included as L<F<key-collision.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.57/examples/key-collision.pl> in the distribution.)
Here the key "a" could be either 1 or 2. As seen in the example,
@@ -561,7 +561,7 @@ produces output
{"fripp":false,"bruce":true,"clapton":true,"hendrix":false}
-(This example is included as L<F<json-tiny-round-trip-demo.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.56/examples/json-tiny-round-trip-demo.pl> in the distribution.)
+(This example is included as L<F<json-tiny-round-trip-demo.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.57/examples/json-tiny-round-trip-demo.pl> in the distribution.)
Most of the other CPAN modules use similar methods to L<JSON::Tiny>,
@@ -714,7 +714,7 @@ produces output
-(This example is included as L<F<collide.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.56/examples/collide.pl> in the distribution.)
+(This example is included as L<F<collide.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Parse-0.57/examples/collide.pl> in the distribution.)
The C<detect_collisions (1)> behaviour is the behaviour of
@@ -1243,8 +1243,8 @@ able to fully work out the reason behind the better speed.
There is some benchmarking code in the github repository under the
directory "benchmarks" for those wishing to test these claims. The
-script L<F<benchmarks/bench>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/benchmarks/bench> is an adaptation of the similar
-script in the L<JSON::XS> distribution. The script L<F<benchmarks/pub-bench.pl>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/benchmarks/pub-bench.pl> runs the benchmarks and prints them
+script L<F<benchmarks/bench>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/benchmarks/bench> is an adaptation of the similar
+script in the L<JSON::XS> distribution. The script L<F<benchmarks/pub-bench.pl>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/benchmarks/pub-bench.pl> runs the benchmarks and prints them
out as POD.
The following benchmark tests used version 0.47 of JSON::Parse and
@@ -1680,7 +1680,7 @@ supplied with the module in the F</t/> subdirectory of the
distribution.
More extensive testing code is in the git repository. This is not
-supplied in the CPAN distribution. A script, L<F<randomjson.pl>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/randomjson.pl>,
+supplied in the CPAN distribution. A script, L<F<randomjson.pl>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/randomjson.pl>,
generates a set number of bytes of random JSON and checks that the
module's bytewise validation of input is correct. It does this by
taking a valid fragment, then adding each possible byte from 0 to 255
@@ -1690,18 +1690,18 @@ it to the fragment and continuing the process until a complete valid
JSON input is formed. The module has undergone about a billion
repetitions of this test.
-This setup relies on a C file, L<F<json-random-test.c>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/json-random-test.c>, which isn't in
-the CPAN distribution, and it also requires L<F<Json3.xs>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/Json3.xs> to be edited
+This setup relies on a C file, L<F<json-random-test.c>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/json-random-test.c>, which isn't in
+the CPAN distribution, and it also requires L<F<Json3.xs>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/Json3.xs> to be edited
to make the macro C<TESTRANDOM> true (uncomment line 7 of the
file). The testing code uses C setjmp/longjmp, so it's not guaranteed
to work on all operating systems and is commented out for CPAN
releases.
-A pure C version called L<F<random-test.c>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/random-test.c> also exists. This applies
+A pure C version called L<F<random-test.c>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/random-test.c> also exists. This applies
exactly the same tests, and requires no Perl at all.
If you're interested in testing your own JSON parser, the outputs
-generated by L<F<randomjson.pl>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/randomjson.pl> are quite a good place to start. The
+generated by L<F<randomjson.pl>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/randomjson.pl> are quite a good place to start. The
default is to produce UTF-8 output, which looks pretty horrible since
it tends to produce long strings of UTF-8 garbage. (This is because it
chooses randomly from 256 bytes and the end-of-string marker C<"> has
@@ -1733,17 +1733,17 @@ module's tests, but some of the files (like 100,000 open arrays)
actually L<cause crashes on some versions of Perl on some
machines|http://fast-matrix.cpantesters.org/?dist=JSON-Parse%200.48_01>,
so they're not really suitable for distribution. The tests are found,
-however, in the repository under L<F<xt/jpts.t>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/xt/jpts.t> and the
-subdirectory L<F<xt/jpts>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/xt/jpts>, so if you are interested in the
+however, in the repository under L<F<xt/jpts.t>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/xt/jpts.t> and the
+subdirectory L<F<xt/jpts>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/xt/jpts>, so if you are interested in the
results, please copy that and try it. There is also a test for the
-L<validjson|/SCRIPT> script as L<F<xt/validjson.t>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/xt/validjson.t> in the
+L<validjson|/SCRIPT> script as L<F<xt/validjson.t>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/xt/validjson.t> in the
repository. These are author tests, so you may need to install extra
modules to run them. These author tests are run automatically before
any code is uploaded to CPAN.
=head1 HISTORY
-See L<F<Changes>|https://github.com/benkasminbullock/JSON-Parse/blob/c00e1e8b7dfc7958de6700700ee20582f81b56a6/Changes> in the distribution for a full list of changes.
+See L<F<Changes>|https://github.com/benkasminbullock/JSON-Parse/blob/42e099ed38a3e85daed46f53bf367fa2b828e152/Changes> in the distribution for a full list of changes.
This module started out under the name C<JSON::Argo>. It was
originally a way to escape from having to use the other JSON modules
diff --git a/lib/JSON/Tokenize.pm b/lib/JSON/Tokenize.pm
index 1f7d64e..69ea3c9 100644
--- a/lib/JSON/Tokenize.pm
+++ b/lib/JSON/Tokenize.pm
@@ -7,7 +7,7 @@ use JSON::Parse;
our @EXPORT_OK = qw/tokenize_json tokenize_start tokenize_next tokenize_start tokenize_end tokenize_type tokenize_child tokenize_text/;
our %EXPORT_TAGS = ('all' => \@EXPORT_OK);
use Carp;
-our $VERSION = '0.56';
+our $VERSION = '0.57';
sub tokenize_text
{
diff --git a/lib/JSON/Tokenize.pod b/lib/JSON/Tokenize.pod
index c168173..2906f35 100644
--- a/lib/JSON/Tokenize.pod
+++ b/lib/JSON/Tokenize.pod
@@ -48,8 +48,8 @@ This outputs
=head1 VERSION
-This documents version 0.56 of JSON::Tokenize corresponding to
-L<git commit c00e1e8b7dfc7958de6700700ee20582f81b56a6|https://github.com/benkasminbullock/JSON-Parse/commit/c00e1e8b7dfc7958de6700700ee20582f81b56a6> released on Mon Feb 17 13:10:15 2020 +0900.
+This documents version 0.57 of JSON::Tokenize corresponding to
+L<git commit 42e099ed38a3e85daed46f53bf367fa2b828e152|https://github.com/benkasminbullock/JSON-Parse/commit/42e099ed38a3e85daed46f53bf367fa2b828e152> released on Thu Jul 9 07:16:33 2020 +0900.
diff --git a/t/string-bug-44.json b/t/string-bug-44.json
new file mode 100755
index 0000000..09dcef8
--- /dev/null
+++ b/t/string-bug-44.json
@@ -0,0 +1 @@
+{"x":"\naaaaaa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string-bug-44.t
new file mode 100755
index 0000000..74c45d0
--- /dev/null
+++ b/t/string-bug-44.t
@@ -0,0 +1,10 @@
+#!/home/ben/software/install/bin/perl
+use warnings;
+use strict;
+use utf8;
+use FindBin '$Bin';
+use Test::More;
+use JSON::Parse 'json_file_to_perl';
+my $in = json_file_to_perl ("$Bin/string-bug-44.json");
+cmp_ok (length ($in->{x}), '==', 4080, "Length as expected");
+done_testing ();