Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
No such thing as a small change
 
PerlMonks  

Re^3: Getting error while decoding JSON object via POST method

by tobyink (Abbot)
on Feb 06, 2013 at 09:59 UTC ( #1017371=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Getting error while decoding JSON object via POST method
in thread Getting error while decoding JSON object via POST method

This error message occurs when you pass the empty string or an undefined variable to be decoded by JSON, JSON::PP or JSON::XS.

So I'd suggest that even with the updated code, the problem is related to the initialization of $jsonText - it appears to be undef.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name


Comment on Re^3: Getting error while decoding JSON object via POST method
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017371]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2014-04-20 09:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls