spring版本:4.2.5.RELEASE 查看“org.springframework.http.converter.StringHttpMessageConverter”源码,中有一段说明: By ;&#;&#;}), and writes with a {@code Content-Type} of {@code text/plain}. This can be overridden by setting the {@link #setSupportedMediaTypes sup
这种用法包括前端和后端: 前端: 1. 转化为JSON对象方便操作 var jsonObj = JSON.parse(str); 得到的是一个json数组对象,可以通过 for (var p in jsonObj){} 来遍历数组中的每个对象,其中p表示key,jsonObj[p]表示key所对应的值. 2. 转化为字符串 var jsonStr = JSON.stringify(jsonObj) 后端:需要用到阿里的fastjson包(其他的用法可以参考博客:https://blog.csdn