1.配置依赖 //fastjson api 'com.alibaba:fastjson:1.2.44' 2.设计服务端返回的数据 {},{},{}]} 3.编写bean类,特别注意,要和服务端返回的类型一致,并且都要public public class User { public String result; public List<Data> data; public class Data{ public String name; public int age; public String
<?php header("content-type:text/html;charset=utf-8"); //echo "飞飞仔超级智障"; $content= "When there is no desire, all things are at peace. - Laozi"; $url = "http://fanyi.youdao.com/openapi.do?keyfrom=keyform&key=key&