问题描述:

http://www.google.com/dictionary/json?callback=dict_api.callbacks.id100&q=test&sl=en&tl=en&restrict=pr%2Cde&client=te

(replace test with your favorite keyword)

using this i want to write simple dictionary....

problem - api give json output how i get it using java?

网友答案:

Simple Parsing Per default, JSON will just produce a nested graph of maps and lists. Here is an example of default parsing:

import org.svenson.JSONParser;

// assume json to be a JSON datasets as String

Object o = JSONParser.defaultJSONParser().parse(json);

o will now contain either a map or a list instance, depending on whether the first symbol in the JSON is '{' or '['.

相关阅读:
Top