summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes3
-rw-r--r--MANIFEST1
-rw-r--r--META.json4
-rw-r--r--META.yml2
-rw-r--r--lib/JSON.pm2
-rw-r--r--lib/JSON/backportPP.pm4
-rw-r--r--lib/JSON/backportPP/Boolean.pm2
-rw-r--r--t/00_pod.t8
-rw-r--r--t/04_dwiw_encode.t4
-rw-r--r--t/05_dwiw_decode.t4
-rw-r--r--t/108_decode.t5
-rw-r--r--t/120_incr_parse_truncated.t36
12 files changed, 34 insertions, 41 deletions
diff --git a/Changes b/Changes
index 3e95c48..bf8ad1c 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
Revision history for Perl extension JSON.
+4.07 2022-06-24
+ - updated backportPP with JSON::PP 4.10
+
4.06 2022-05-22
- updated backportPP with JSON::PP 4.09
diff --git a/MANIFEST b/MANIFEST
index 4eeccc9..ce99264 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -12,7 +12,6 @@ README
t/00_backend_version.t
t/00_load.t
t/00_load_backport_pp.t
-t/00_pod.t
t/01_utf8.t
t/02_error.t
t/03_types.t
diff --git a/META.json b/META.json
index f10ff0d..4958468 100644
--- a/META.json
+++ b/META.json
@@ -48,6 +48,6 @@
"url" : "https://github.com/makamaka/JSON"
}
},
- "version" : "4.06",
- "x_serialization_backend" : "JSON version 4.06"
+ "version" : "4.07",
+ "x_serialization_backend" : "JSON version 4.07"
}
diff --git a/META.yml b/META.yml
index de3da07..c01733a 100644
--- a/META.yml
+++ b/META.yml
@@ -24,5 +24,5 @@ requires:
resources:
bugtracker: https://github.com/makamaka/JSON/issues
repository: https://github.com/makamaka/JSON
-version: '4.06'
+version: '4.07'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/lib/JSON.pm b/lib/JSON.pm
index 2c7ed1e..22101ca 100644
--- a/lib/JSON.pm
+++ b/lib/JSON.pm
@@ -9,7 +9,7 @@ BEGIN { @JSON::ISA = 'Exporter' }
@JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
BEGIN {
- $JSON::VERSION = '4.06';
+ $JSON::VERSION = '4.07';
$JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
$JSON::DEBUG = $ENV{ PERL_JSON_DEBUG } if exists $ENV{ PERL_JSON_DEBUG };
}
diff --git a/lib/JSON/backportPP.pm b/lib/JSON/backportPP.pm
index 5abe6f8..1bec128 100644
--- a/lib/JSON/backportPP.pm
+++ b/lib/JSON/backportPP.pm
@@ -15,7 +15,7 @@ use JSON::backportPP::Boolean;
use Carp ();
#use Devel::Peek;
-$JSON::backportPP::VERSION = '4.09';
+$JSON::backportPP::VERSION = '4.10';
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
@@ -1310,7 +1310,7 @@ BEGIN {
}
for my $c ( unpack( $type, $str ) ) { # emulate pv_uni_display() ?
- my $chr_c = $c;
+ my $chr_c = chr($c);
$mess .= $chr_c eq '\\' ? '\\\\'
: $chr_c =~ /[[:print:]]/ ? $chr_c
: $chr_c eq '\a' ? '\a'
diff --git a/lib/JSON/backportPP/Boolean.pm b/lib/JSON/backportPP/Boolean.pm
index 15af674..30cd6b9 100644
--- a/lib/JSON/backportPP/Boolean.pm
+++ b/lib/JSON/backportPP/Boolean.pm
@@ -11,7 +11,7 @@ overload::import('overload',
fallback => 1,
);
-$JSON::backportPP::Boolean::VERSION = '4.09';
+$JSON::backportPP::Boolean::VERSION = '4.10';
1;
diff --git a/t/00_pod.t b/t/00_pod.t
deleted file mode 100644
index e8e3082..0000000
--- a/t/00_pod.t
+++ /dev/null
@@ -1,8 +0,0 @@
-use strict;
-$^W = 1;
-
-use Test::More;
-
-eval "use Test::Pod 1.00";
-plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
-all_pod_files_ok ();
diff --git a/t/04_dwiw_encode.t b/t/04_dwiw_encode.t
index b31cedd..de32ed7 100644
--- a/t/04_dwiw_encode.t
+++ b/t/04_dwiw_encode.t
@@ -7,12 +7,10 @@
use strict;
use warnings;
-use Test;
+use Test::More tests => 5;
# main
{
- BEGIN { plan tests => 5 }
-
BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; }
use JSON;
diff --git a/t/05_dwiw_decode.t b/t/05_dwiw_decode.t
index fb94f20..5cb1d60 100644
--- a/t/05_dwiw_decode.t
+++ b/t/05_dwiw_decode.t
@@ -7,12 +7,10 @@
use strict;
use warnings;
-use Test;
+use Test::More tests => 7;
# main
{
- BEGIN { plan tests => 7 }
-
BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; }
use JSON;
diff --git a/t/108_decode.t b/t/108_decode.t
index c575a2e..82e624f 100644
--- a/t/108_decode.t
+++ b/t/108_decode.t
@@ -5,7 +5,7 @@ use strict;
use warnings;
use Test::More;
-BEGIN { plan tests => 6 };
+BEGIN { plan tests => 7 };
BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; }
@@ -41,3 +41,6 @@ utf8::encode($utf8); # UTF-8 flagged off
is($utf8, ($isASCII) ? "\xf0\x92\x90\x80" : "\xDE\x4A\x41\x41");
+eval { $json->decode(q|{"action":"foo" "method":"bar","tid":1}|) };
+my $error = $@;
+like $error => qr!""method":"bar","tid"..."!;
diff --git a/t/120_incr_parse_truncated.t b/t/120_incr_parse_truncated.t
index 0eb908e..8e3f5bc 100644
--- a/t/120_incr_parse_truncated.t
+++ b/t/120_incr_parse_truncated.t
@@ -15,7 +15,7 @@ sub run_test {
run_test('{"one": 1}', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok ($res, "curly braces okay -- '$input'");
@@ -25,7 +25,7 @@ run_test('{"one": 1}', sub {
run_test('{"one": 1]', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "unbalanced curly braces -- '$input'");
@@ -35,7 +35,7 @@ run_test('{"one": 1]', sub {
run_test('"', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -45,7 +45,7 @@ run_test('"', sub {
run_test('{', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -55,7 +55,7 @@ run_test('{', sub {
run_test('[', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -65,7 +65,7 @@ run_test('[', sub {
run_test('}', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -75,7 +75,7 @@ run_test('}', sub {
run_test(']', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -105,7 +105,7 @@ run_test('1', sub {
run_test('"1', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -115,7 +115,7 @@ run_test('"1', sub {
run_test('\\', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -125,7 +125,7 @@ run_test('\\', sub {
run_test('{"one": "', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -135,7 +135,7 @@ run_test('{"one": "', sub {
run_test('{"one": {', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -145,7 +145,7 @@ run_test('{"one": {', sub {
run_test('{"one": [', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -155,7 +155,7 @@ run_test('{"one": [', sub {
run_test('{"one": t', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -165,7 +165,7 @@ run_test('{"one": t', sub {
run_test('{"one": \\', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -175,7 +175,7 @@ run_test('{"one": \\', sub {
run_test('{"one": ', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -185,7 +185,7 @@ run_test('{"one": ', sub {
run_test('{"one": 1', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");
@@ -195,7 +195,7 @@ run_test('{"one": 1', sub {
run_test('{"one": {"two": 2', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated '$input'");
@@ -206,7 +206,7 @@ run_test('{"one": {"two": 2', sub {
# Test Appending Closing '}' Curly Bracket
run_test('{"one": 1', sub {
my $input = shift;
- my $coder = JSON->new;
+ my $coder = JSON->new->allow_nonref(1);
my $res = eval { $coder->incr_parse($input) };
my $e = $@; # test more clobbers $@, we need it twice
ok (!$res, "truncated input='$input'");