Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use v6;
- use HTTP::UserAgent;
- use JSON::Fast;
- constant API = "5vtqfnm9ud3tzr3atmv8suw3";
- my $ua = HTTP::UserAgent.new;
- my $response = $ua.get("http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/top_rentals.json?limit=10&country=us&apikey=blah");
- my $x = from-json ($response.content);
- my $y = to-json($x, :pretty);
- spurt $y, "testJson.txt"
Add Comment
Please, Sign In to add comment