in reply to Re: problem parsing jsonin thread problem parsing json
Here's what I get when I try to parse the JSON you posted:
$ perl -MJSON::Tiny -MData::Dumper -n0777E '$j=JSON::Tiny->new; $o=$j-
+>decode($_); say length $o ? Dumper($o) : $j->error;' diamondsandperl
Malformed JSON: Expected array or object at line 0, offset 0
If you pass malformed JSON, you won't get a desirable result. You're using JSON, so with the JSON you posted, you'll get:
$ perl -MJSON -MData::Dumper -n0777E 'say Dumper( JSON->new->decode($_
+) );' diamondsandperls.json
malformed JSON string, neither array, object, number, string or atom,
+at character offset 995 (before "],\n "...") at -e line
+ 1, <> chunk 1.
If that's not the error you're seeing, please post the actual JSON document you're working with. Otherwise, you're not likely to get much useful help.
the call is json are you saying the heading is not. it is just a heading
JSON doesn't have calls or headings, and the data you posted isn't JSON
Conway's Game of Life
Perl regular expressions
My Magic 8-Ball™
Results (192 votes). Check out past polls.