Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^7: Not an ARRAY reference

by roboticus (Chancellor)
on Nov 08, 2020 at 21:11 UTC ( [id://11123508]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Not an ARRAY reference
in thread Not an ARRAY reference

chandantul:

The JSON parser I use decodes an entire record at one time, so either the whole JSON record parses correctly or it's rejected. I only showed a text file line-based example because it was easy. If you want to handle a response at a time, it would be essentially the same: Wrap the JSON decode operation in an eval { } block, then check the $@ variable to see if there's an exception after the eval block and choose to process the data or handle the error.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^8: Not an ARRAY reference
by chandantul (Scribe) on Nov 13, 2020 at 04:00 UTC

    The issue has been resolved once changed the API call. The issue was with JSON response

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-25 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found