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.
精彩评论