English 中文(简体)
如何在 Java与XStream打交道?
原标题:How to handle JSON with XStream in Java?

我建立了谷歌习俗搜索引擎,并利用吉大港山区理工学院启动询问。 现在,谷歌正在恢复“JSON”模式的成果。 我很想知道,如何将这名智者的产出纳入人类可读的方式。

例如:

Title: The matrix
htmlTitle: "The matrix.."

我看到,许多论坛都建议采用XStream办法。 但不能确定我如何能够做到这一点。

请允许我帮助我。

仅供参考的是,我在此向《吉大港山区国际刑法》:

public static void main(String[] args) throws IOException {

    HttpGet httpget = new HttpGet("https://www.googleapis.com/customsearch/v1?key=AIzaSyBp_5Upf6h0QSXR8UveLs4_c6lAmGW_7B8&cx=014783642332862910131:opc1zgsvfhi&q=matrix&alt=json");
    System.out.println(httpget.getURI());
    ResponseHandler<String> responseHandler = new BasicResponseHandler();
    HttpClient httpClient = new DefaultHttpClient();
    String responseBody = httpClient.execute(httpget, responseHandler);
    System.out.println(responseBody);
问题回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签