This discussion is archived
2 Replies Latest reply: Dec 19, 2011 7:22 PM by DavidThi808 RSS

What's the best way to read JSON data?

DavidThi808 Newbie
Currently Being Moderated
Hi all;

What is the best way to read in JSON data? And is the best way to use it once read in to turn it into XML and apply XPath?

thanks - dave
  • 1. Re: What's the best way to read JSON data?
    jtahlborn Expert
    Currently Being Moderated
    DavidThi808 wrote:
    What is the best way to read in JSON data? And is the best way to use it once read in to turn it into XML and apply XPath?
    without having a better understanding of what your definition of "use it" is, this question is essentially unanswerable. Jackson is a fairly popular library for translating json to/from java objects. the json website provides a very basic library for parsing to/from xml. which one is the "best" depends on what you want to do with it.
  • 2. Re: What's the best way to read JSON data?
    DavidThi808 Newbie
    Currently Being Moderated
    jtahlborn wrote:

    without having a better understanding of what your definition of "use it" is, this question is essentially unanswerable. Jackson is a fairly popular library for translating json to/from java objects. the json website provides a very basic library for parsing to/from xml. which one is the "best" depends on what you want to do with it.
    Good point. We have a reporting product ([www.windward.net|http://www.windward.net]) and we've had a number of people ask us for JSON support. But how complex the data is and what they want to pull is all over the place. The one thing that's commin is they generally want to pull down the JSON data, and then put specific items from that in the report.

    XML/XPath struck me as a good way to do this for a couple of reasons. First it seems to map well to the JSON data layout. Second it provides a known query language. Third, we have a really good XPath wizard and we could then use it for JSON also.

    ??? - thanks - dave

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points