Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^7: Not an ARRAY reference

by roboticus (Chancellor)
on Nov 08, 2020 at 21:11 UTC ( #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 (Sexton) 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
Node Status?
node history
Node Type: note [id://11123508]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2021-01-18 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?