Search code examples
javajsongsonfreebase

how to parse Freebase topic api response with gson


is it possible to parse the json response returned by the Freebase experimental TOPIC Api with the google gson library? i have used gson to parse the json repsone from multiple freebase mqlread responses. i am now stuck attempting to parse json messages like the response from this

http://api.freebase.com/api/experimental/topic/basic?id=/en/sgt_peppers_lonely_hearts_club_band

or from this

http://api.freebase.com/api/experimental/topic/basic?id=/en/please_please_me,/en/sgt_peppers_lonely_hearts_club_band

or this

http://api.freebase.com/api/experimental/topic/standard?id=/guid/9202a8c04000641f800000000de75560&domains=all

is it possible to parse all three repsones with one gson "code set"


Solution

  • I have not tried to do this but there is no reason why it wouldn't work. Are you getting any errors when you use it ? If you paste your code and errors I might be able to help you more.