I've been looking at JSON "things" if only to be able to figure out a taxonomy for them. I get the same output as haukex does from the preceding script, but I would think they this should be decodable as JSON. Instead, I get an error:
$ $ ./1.js.pl {"baz":function () { /* some JS here? */ },"foo":["bar","quz"]} $ ./1.json.pl 'false' expected, at character offset 7 (before "function () { /* som. +..") at ./1.json.pl line 7, <DATA> line 1. $ cat 1.json.pl #!/usr/bin/perl -w use 5.011; use Data::Dumper; use JSON; my $json = <DATA>; my $perl = decode_json $json; print Dumper $perl; __DATA__ {"baz":function () { /* some JS here? */ },"foo":["bar","quz"]} $
In reply to Re^2: Outputting JSON with function () {...} values
by Aldebaran
in thread Outputting JSON with function () {...} values
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |