PDA

View Full Version : JsonReader mapping...


zquirm
05-07-2007, 01:20 AM
anyone know how I would map this with JsonReader (it's from Yahoo! search):

{"ResultSet":{
"type":"web",
"totalResultsAvailable":4,
"totalResultsReturned":1,
"firstResultPosition":1,
"moreSearch":"\/WebSearchService\/V1\/webSearch?query=jarrodzimmerman&region=us",
"Result":[{"Title":"Columbus Trips - Trip Planner - Yahoo! Travel",
"Summary":"Browse plans, photos, and journals for popular trips to Columbus! ... 8 day trip by jarrodzimmerman (View jarrodzimmerman's trips) Indianapolis, Columbus ...",
"Url":"http:\/\/travel.yahoo.com\/trip-search-destid-191501991-page-10",
"ClickUrl":"http:%3a\/\/travel.yahoo.com\/trip-search-destid-191501991-page-10","DisplayUrl":"travel.yahoo.com\/trip-search-destid-191501991-page-10",
"ModificationDate":1174028400,"MimeType":"text\/html"}]
}
}

The root here is ResultSet, but it's really Result that I want to access.

thoughts?

jsakalos
05-07-2007, 09:25 AM
Try root:'ResultSet.Result'.

Animal
05-07-2007, 09:33 AM
Don't forget


totalProperty:"ResultSet.totalResultsAvailable"


To allow the paging to work correctly.