Skip Menu |

This queue is for tickets about the JSON-Path CPAN distribution.

Report information
The Basics
Id: 123381
Status: open
Priority: 0/
Queue: JSON-Path

People
Owner: Nobody in particular
Requestors: victoryshima [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: JSON::Path::Evaluator error in map() when using JSON::true
Date: Wed, 25 Oct 2017 22:01:47 +0100
To: bug-JSON-Path [...] rt.cpan.org
From: Rafael Schimassek <victoryshima [...] gmail.com>
First of all, thanks for the work you have put in this module! I am experiencing errors when iterating over a hashref that contains the boolean values provided by JSON::true and JSON::false. According to the documentation I believe it should ignore the objects, but there might be some magic behind those Json booleans. When it iterates over a JSON::true it displays the following error: Not a HASH reference at /home/shima/perl5/lib/perl5/JSON/Path/Evaluator.pm line 146. And when it iterates over a JSON::false it displays the following error: Can't locate object method "root" via package "JSON::Path::Evaluator" at /home/shima/perl5/lib/perl5/JSON/Path/Evaluator.pm line 130. System Information: Main Distribution: JSON-Path-0.411 Other Distributions: JSON-2.94 Perl Version: This is perl 5, version 22, subversion 4 (v5.22.4) built for x86_64-linux-thread-multi (with 61 registered patches, see perl -V for more detail) OS Vendor and Versions: Linux hostname 4.11.12-100.fc24.x86_64 #1 SMP Fri Jul 21 17:35:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Short Code to Reproduce Error: use strict; use warnings; use JSON; use JSON::Path; my $data = { key => JSON::false }; my $method = sub { return $_ }; JSON::Path->new( '$.key' )->map( $data, $method ); 1; Many thanks!
Subject: Re: [rt.cpan.org #123381] JSON::Path::Evaluator error in map() when using JSON::true
Date: Wed, 25 Oct 2017 16:20:02 -0500
To: bug-JSON-Path [...] rt.cpan.org
From: Kit Peters <popefelix [...] gmail.com>
Thanks! I'll check into it. On Wed, Oct 25, 2017 at 4:02 PM, Rafael Schimassek via RT < bug-JSON-Path@rt.cpan.org> wrote: Show quoted text
> Wed Oct 25 17:02:08 2017: Request 123381 was acted upon. > Transaction: Ticket created by victoryshima@gmail.com > Queue: JSON-Path > Subject: JSON::Path::Evaluator error in map() when using JSON::true > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: victoryshima@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=123381 > > > > First of all, thanks for the work you have put in this module! > > I am experiencing errors when iterating over a hashref that contains the > boolean values provided by JSON::true and JSON::false. According to the > documentation I believe it should ignore the objects, but there might be > some magic behind those Json booleans. > > When it iterates over a JSON::true it displays the following error: > > Not a HASH reference at > /home/shima/perl5/lib/perl5/JSON/Path/Evaluator.pm line 146. > > And when it iterates over a JSON::false it displays the following error: > > Can't locate object method "root" via package > "JSON::Path::Evaluator" at > /home/shima/perl5/lib/perl5/JSON/Path/Evaluator.pm line 130. > > > > System Information: > > Main Distribution: JSON-Path-0.411 > > Other Distributions: JSON-2.94 > > Perl Version: This is perl 5, version 22, subversion 4 (v5.22.4) > built for x86_64-linux-thread-multi (with 61 registered patches, see > perl -V for more detail) > > OS Vendor and Versions: Linux hostname 4.11.12-100.fc24.x86_64 #1 > SMP Fri Jul 21 17:35:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux > > > > Short Code to Reproduce Error: > > use strict; > use warnings; > use JSON; > use JSON::Path; > > my $data = { key => JSON::false }; > my $method = sub { return $_ }; > > JSON::Path->new( '$.key' )->map( $data, $method ); > > 1; > > > > Many thanks! > >
-- Kit Peters, W0KEH GPG public key fingerpint: D4FF AA62 AFEA 83D6 CC98 ACE5 6FAE 7E74 7F56 ED1D Hello to any and all NSA, DEA, or other government or non-government agents reading this email. Tell me about your life; I'll tell you about mine.
I have not done a thing with this. I'm sorry. But soon. Please bug me about it! :D On Wed Oct 25 17:20:44 2017, popefelix wrote: Show quoted text
> Thanks! I'll check into it. > > On Wed, Oct 25, 2017 at 4:02 PM, Rafael Schimassek via RT < > bug-JSON-Path@rt.cpan.org> wrote: >
> > Wed Oct 25 17:02:08 2017: Request 123381 was acted upon. > > Transaction: Ticket created by victoryshima@gmail.com > > Queue: JSON-Path > > Subject: JSON::Path::Evaluator error in map() when using JSON::true > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: victoryshima@gmail.com > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=123381 > > > > > > > First of all, thanks for the work you have put in this module! > > > > I am experiencing errors when iterating over a hashref that contains the > > boolean values provided by JSON::true and JSON::false. According to the > > documentation I believe it should ignore the objects, but there might be > > some magic behind those Json booleans. > > > > When it iterates over a JSON::true it displays the following error: > > > > Not a HASH reference at > > /home/shima/perl5/lib/perl5/JSON/Path/Evaluator.pm line 146. > > > > And when it iterates over a JSON::false it displays the following error: > > > > Can't locate object method "root" via package > > "JSON::Path::Evaluator" at > > /home/shima/perl5/lib/perl5/JSON/Path/Evaluator.pm line 130. > > > > > > > > System Information: > > > > Main Distribution: JSON-Path-0.411 > > > > Other Distributions: JSON-2.94 > > > > Perl Version: This is perl 5, version 22, subversion 4 (v5.22.4) > > built for x86_64-linux-thread-multi (with 61 registered patches, see > > perl -V for more detail) > > > > OS Vendor and Versions: Linux hostname 4.11.12-100.fc24.x86_64 #1 > > SMP Fri Jul 21 17:35:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux > > > > > > > > Short Code to Reproduce Error: > > > > use strict; > > use warnings; > > use JSON; > > use JSON::Path; > > > > my $data = { key => JSON::false }; > > my $method = sub { return $_ }; > > > > JSON::Path->new( '$.key' )->map( $data, $method ); > > > > 1; > > > > > > > > Many thanks! > > > >
> >
I also have this issue, but with false. Specifically a: JSON::PP::Boolean { Parents Types::Serialiser::BooleanBase public methods (0) private methods (1) : __ANON__ internals: 0 } On Tue Apr 16 13:42:49 2019, popefelix wrote: Show quoted text
> I have not done a thing with this. I'm sorry. But soon. Please bug me > about it! :D > > On Wed Oct 25 17:20:44 2017, popefelix wrote:
> > Thanks! I'll check into it. > > > > On Wed, Oct 25, 2017 at 4:02 PM, Rafael Schimassek via RT < > > bug-JSON-Path@rt.cpan.org> wrote: > >
> > > Wed Oct 25 17:02:08 2017: Request 123381 was acted upon. > > > Transaction: Ticket created by victoryshima@gmail.com > > > Queue: JSON-Path > > > Subject: JSON::Path::Evaluator error in map() when using > > > JSON::true > > > Broken in: (no value) > > > Severity: (no value) > > > Owner: Nobody > > > Requestors: victoryshima@gmail.com > > > Status: new > > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=123381 > > > > > > > > > > First of all, thanks for the work you have put in this module! > > > > > > I am experiencing errors when iterating over a hashref that > > > contains the > > > boolean values provided by JSON::true and JSON::false. According to > > > the > > > documentation I believe it should ignore the objects, but there > > > might be > > > some magic behind those Json booleans. > > > > > > When it iterates over a JSON::true it displays the following error: > > > > > > Not a HASH reference at > > > /home/shima/perl5/lib/perl5/JSON/Path/Evaluator.pm line 146. > > > > > > And when it iterates over a JSON::false it displays the following > > > error: > > > > > > Can't locate object method "root" via package > > > "JSON::Path::Evaluator" at > > > /home/shima/perl5/lib/perl5/JSON/Path/Evaluator.pm line 130. > > > > > > > > > > > > System Information: > > > > > > Main Distribution: JSON-Path-0.411 > > > > > > Other Distributions: JSON-2.94 > > > > > > Perl Version: This is perl 5, version 22, subversion 4 (v5.22.4) > > > built for x86_64-linux-thread-multi (with 61 registered patches, > > > see > > > perl -V for more detail) > > > > > > OS Vendor and Versions: Linux hostname 4.11.12-100.fc24.x86_64 #1 > > > SMP Fri Jul 21 17:35:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux > > > > > > > > > > > > Short Code to Reproduce Error: > > > > > > use strict; > > > use warnings; > > > use JSON; > > > use JSON::Path; > > > > > > my $data = { key => JSON::false }; > > > my $method = sub { return $_ }; > > > > > > JSON::Path->new( '$.key' )->map( $data, $method ); > > > > > > 1; > > > > > > > > > > > > Many thanks! > > > > > >
> > > >