开发者

Extracting data in java from a received java-script page

I receive a java-script encoded page when I am doing 开发者_如何学编程the GET request for a search in Google api. Now I need to extract the value of "unescapedUrl" and "titleNoFormatting" out of this. Normally in C++ I would use search by word and then use pointers to get the next coming characters, but I have no idea what to do in java.


I receive a java-script encoded page when i am doing the GET request for a search in Google api.

This appears to be mostly JSON.

normally in c++ i would use search by word and then use pointers to get the next coming characters

If so, and if this is JSON output, then a C++ developer should use a JSON parsing library.

but i have no idea what to do in java.

Similarly, a Java developer should use a JSON parsing library. Android has the org.json parsing classes built in, and there is a separate JSONReader (based on GSON) in Android 3.x.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜