Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Send JSON data to Perl scalar

by Corion (Patriarch)
on Dec 21, 2012 at 15:24 UTC ( [id://1009923]=note: print w/replies, xml ) Need Help??


in reply to Send JSON data to Perl scalar

I would look at the HTTP requests that this page makes and replicate them using LWP::Simple and JSON::Any.

An alternative approach would be to use a module or program that understands Javascript and acts like a browser, for example WWW::Scripter or WWW::Mechanize::Firefox, and then read the information out of the resulting page.

Replies are listed 'Best First'.
Re^2: Send JSON data to Perl scalar
by perl.j (Pilgrim) on Dec 21, 2012 at 15:28 UTC

    What if I don't print it to a webpage yet. Is there any way that I can just send the data directly to a Perl script?

    --perl.j

      Neither LWP::Simple nor JSON::Any "print to a web page", so I'm not sure why you think that "printing to a web page" comes into play with the approaches I suggested. Maybe you want to read the documentation of JSON::Any or JSON::XS?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-20 04:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found