3
不懂日文内容
我尝试使用下面的代码来读取维基无法从维基
ClientConfig clientConfig = new DefaultClientConfig();
client = Client.create(clientConfig);
WebResource webResource = client.resource("http://ja.wikipedia.org/w/api.php?format=json&action=query&titles=AKB48&rvprop=content&prop=revisions");
String s = webResource.get(String.class);
System.out.println(s);
日本内容和结果就像
{"query":{"pages":{"2276803":{"pageid":2276803,"ns":0,"title":"AKB48","revisions":[{"contentformat":"text/x-wiki","contentmodel":"wikitext","*":"{{Otheruseslist|\u65e5\u672c\u306e\u5973\u6027\u30a2\u30a4\u30c9\u30eb\u30b0\u30eb\u30fc\u30d7....
它表明\ UXXX,而不是真正的日语单词。我知道它一定是编码问题。但我仍然无法完成工作。
任何帮助将不胜感激。
你是绝对正确的。它的工作原理,如果我将结果传送与'Jackson'到对象!在我只想读取字符串结果之前... – newhand 2013-05-02 18:31:33