Loading ...
Sorry, an error occurred while loading the content.

Re: About parsing

Expand Messages
  • luchkovsky
    ... might help ... Please try JsonTools http://sourceforge.net/projects/jsontools v1.01. JsonTools include decisions for most frequent tasks with JSON model,
    Message 1 of 3 , Feb 14, 2007
    • 0 Attachment
      --- In json@yahoogroups.com, "shalini israni" <shaliny.i@...> wrote:
      >
      > I don't know if u looked at this http://www.json.org/json.js
      ....copy and
      > paste this full thing into a file named json.js and this link
      > http://snipplr.com/view/1031/json-parser/ shows how to use it....
      > i maybe wrong because i havent read it properly...but i think it
      might help
      > u....
      >
      > On 1/19/07, shiju pc <shijupc123@...> wrote:
      > >
      > > Hi Memebers of JSON,
      > >
      > > Thnk you for your kind response.
      > >
      > > But I am strugging on the same problem..
      > >
      > > My File is something like that
      > >
      > > {"bindings": [
      > > {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"},
      > > {"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"},
      > > {"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"}
      > > ]
      > > };
      > >
      > > I am very much able to display the nested objects.
      > >
      > > Its like that
      > >
      > > alert(bindings[0].method)
      > >
      > > //newURI..output
      > >
      > > But in generalize 'bindings[0]' and 'method' are hardcoded..
      > >
      > > Here is the main problem arise.
      > >
      > > How to parse these type of files into any of the format..?
      > >
      > > So please post your suggestions regarding the problem..
      > >
      > > Thanks
      > > Shiju p.c
      > >
      > >
      > > ---------------------------------
      > > Food fight? Enjoy some healthy debate
      > > in the Yahoo! Answers Food & Drink Q&A.
      > >
      > > [Non-text portions of this message have been removed]
      > >
      > >
      > >
      >
      >
      >
      > --
      >
      > Shalini
      >
      >
      > [Non-text portions of this message have been removed]
      >

      Please try JsonTools http://sourceforge.net/projects/jsontools v1.01.
      JsonTools include decisions for most frequent tasks with JSON model,
      one of them: fast dynamic safe get value method for JSON model.

      new JsonTools().getValue(object,"bindings[0].method")
    Your message has been successfully submitted and would be delivered to recipients shortly.