javajsonparsingyahoo-boss-api

How to parse Yahoo BOSS API response


I have used the following Java code from Yahoo to get search results response (Go to: Java Example) in the following link: http://developer.yahoo.com/boss/search/boss_api_guide/codeexamples.html

I registered and got my OAuth consumer key and secret and inserted them in the code. I got the following output

enter image description here

I am totally new to dealing with Json response and parsing them. Can anybody help in how can I parse this response in order to get the search results ???


Solution

  • You can try using a library like Gson to convert the Json response into Java objects and use it with ease.

    Check this for a simple tutorial:

    http://www.javabeat.net/2012/04/parsing-json-using-java-and-gson-library/