Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: problem parsing json

by Anonymous Monk
on Sep 29, 2012 at 01:15 UTC ( [id://996315]=note: print w/replies, xml ) Need Help??


in reply to problem parsing json

JSON SAMPLE:

That is not valid JSON, mystery solved

Replies are listed 'Best First'.
Re^2: problem parsing json
by diamondsandperls (Beadle) on Sep 29, 2012 at 02:55 UTC
    the call is json are you saying the heading is not. it is just a heading

      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 +s.json 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.


      Dave

      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

        I realize and my apology see my earlier post
      Noting next time to use data dumper to get the json information $json_text->{balArray}1{containerArray}[0]{entryArray}[0]{timestamp}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-26 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found