不懂呀 识别是这种东西输出,6行字 {"log_id": 3182664244844649626, "direction": 0, "words_result_num": 6, "words_result": [{"words": "创造无数的“希望”,无数的“可能”"}, {"words": "梦想是这里的一个信念,我们对未来负贵"}, {"words": "让新生装满期待,让梦衔接未来!"}, {"words": "Everything we do is just to weave"}, {"words": "their wings for their dream"}, {"words": "to connect the future"}]}
最终还是用了fastjson。貌似fastjson有专门封装了一个Android的包。
已解决,用阿里的fastjson-1.2.2.jar包 Map maps = (Map)JSON.parse(value); 从Map里面获取值
你可以简单的理解为返回的是一个多维数组,其第一组是:"log_id","words_result_num","words_result";
然后再取 "words_result" 数组里面的 "words" 信息就可以了,因为"words"有好多个,所以需要用for循环来读取所以的信息。
不懂呀 识别是这种东西输出,6行字 {"log_id": 3182664244844649626, "direction": 0, "words_result_num": 6, "words_result": [{"words": "创造无数的“希望”,无数的“可能”"}, {"words": "梦想是这里的一个信念,我们对未来负贵"}, {"words": "让新生装满期待,让梦衔接未来!"}, {"words": "Everything we do is just to weave"}, {"words": "their wings for their dream"}, {"words": "to connect the future"}]}
返回是JSON格式内容。Java的话就是用fastjson 解析就能根据key获取值。不清楚Android是否这样的概念。虽说都是Java
安卓Demo