in reply to Re: Outputting JSON with function () {...} values
in thread Outputting JSON with function () {...} values
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"]} $
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Outputting JSON with function () {...} values
by haukex (Archbishop) on Oct 25, 2018 at 07:51 UTC | |
|
Re^3: Outputting JSON with function () {...} values
by LanX (Saint) on Oct 25, 2018 at 06:56 UTC |