java与前端数据交互时json转化的几种思路 1. 用@responsebody 注解放到controller方法上让返回的数据json化 注:spring框架的注解 2. 前端写ajax时采用dataJson:jsonp的形式传参数 3. 自己编写返回json的自定义方法返回