Skip Menu |

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

Report information
The Basics
Id: 68240
Status: rejected
Priority: 0/
Queue: JSON-Any

People
Owner: Nobody in particular
Requestors: AWNCORP [...] cpan.org
Cc:
AdminCc:

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



Test case A: my $meta = WWW::CPAN->new->fetch_distmeta({ dist => 'Spreadsheet-Perl', author => 'NKH', format => 'json' }); Error: ERROR: malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at C:/str awberry/perl/site/lib/JSON/Any.pm line 527, <IN> line 21. Test case B: my $meta = WWW::CPAN->new->fetch_distmeta({ dist => 'Net-VNC', author => 'LBROCARD', format => 'json' }); Error: ERROR: malformed UTF-8 character in JSON string, at character offset 65 (before "\x{9bee} Brocard <lb...") at C:/strawberry/perl/site/l ib/JSON/Any.pm line 527, <IN> line 27.
Subject: Re: [rt.cpan.org #68240]
Date: Mon, 16 May 2011 13:00:57 -0400
To: bug-JSON-Any [...] rt.cpan.org
From: Chris Prather <chris [...] prather.org>
On Mon, May 16, 2011 at 12:43 PM, Al Newkirk via RT <bug-JSON-Any@rt.cpan.org> wrote: Show quoted text
> Mon May 16 12:43:08 2011: Request 68240 was acted upon. > Transaction: Ticket created by AWNCORP >       Queue: JSON-Any >     Subject: (No subject given) >   Broken in: (no value) >    Severity: (no value) >       Owner: Nobody >  Requestors: AWNCORP@cpan.org >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=68240 > > > > Test case A: > my $meta = WWW::CPAN->new->fetch_distmeta({ dist => 'Spreadsheet-Perl', > author => 'NKH', format => 'json' }); > > Error: > ERROR: malformed JSON string, neither array, object, number, string or > atom, at character offset 0 (before "(end of string)") at C:/str > awberry/perl/site/lib/JSON/Any.pm line 527, <IN> line 21. > > Test case B: > my $meta = WWW::CPAN->new->fetch_distmeta({ dist => 'Net-VNC', author => > 'LBROCARD', format => 'json' }); > > Error: > ERROR: malformed UTF-8 character in JSON string, at character offset 65 > (before "\x{9bee} Brocard <lb...") at C:/strawberry/perl/site/l > ib/JSON/Any.pm line 527, <IN> line 27. >
You'll need to show me the JSON it is trying to parse. JSON::Any does not actually do any of the parsing itself, it is simply a wrapper for other JSON parsers. -Chris
CC: AWNCORP [...] cpan.org
Subject: Re: [rt.cpan.org #68240]
Date: Mon, 16 May 2011 13:09:40 -0400
To: bug-JSON-Any [...] rt.cpan.org
From: "Al Newkirk & Associates" <we [...] ana.im>
Test case B: http://search.cpan.org/meta/LBROCARD/Net-VNC/META.json <http://search.cpan.org/meta/LBROCARD/Net-VNC/META.json>Test case A: http://search.cpan.org/meta/NKH/Spreadsheet-Perl/META.json -- should probably return an empty json object On Mon, May 16, 2011 at 1:01 PM, chris@prather.org via RT < bug-JSON-Any@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=68240 > > > On Mon, May 16, 2011 at 12:43 PM, Al Newkirk via RT > <bug-JSON-Any@rt.cpan.org> wrote:
> > Mon May 16 12:43:08 2011: Request 68240 was acted upon. > > Transaction: Ticket created by AWNCORP > > Queue: JSON-Any > > Subject: (No subject given) > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: AWNCORP@cpan.org > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=68240 > > > > > > > Test case A: > > my $meta = WWW::CPAN->new->fetch_distmeta({ dist => 'Spreadsheet-Perl', > > author => 'NKH', format => 'json' }); > > > > Error: > > ERROR: malformed JSON string, neither array, object, number, string or > > atom, at character offset 0 (before "(end of string)") at C:/str > > awberry/perl/site/lib/JSON/Any.pm line 527, <IN> line 21. > > > > Test case B: > > my $meta = WWW::CPAN->new->fetch_distmeta({ dist => 'Net-VNC', author => > > 'LBROCARD', format => 'json' }); > > > > Error: > > ERROR: malformed UTF-8 character in JSON string, at character offset 65 > > (before "\x{9bee} Brocard <lb...") at C:/strawberry/perl/site/l > > ib/JSON/Any.pm line 527, <IN> line 27. > >
> > > You'll need to show me the JSON it is trying to parse. > > JSON::Any does not actually do any of the parsing itself, it is simply > a wrapper for other JSON parsers. > > -Chris > >
-- Al Newkirk & Associates Internet Business Consultants http://ana.im we@ana.im 215 469 1262
JSON::Any just proxies the file to one of the backends; it doesn't actually do any decoding itself. You didn't provide any details in the report that indicated which backend was in use. However, in the last year there has been a lot of churn with META.json generation concerning utf8 and unicode encoding; it is quite possible that the meta files in question were badly generated. Please feel free to open a new ticket with more diagnostics if you see this again, but otherwise, I don't think there's anything we can do.