登录后复制 import com.alibaba.fastjson.{JSON, JSONObject} val resultList = new util.ArrayList[JSONObject]() var resultMap = new JSONObject(true) resultMap.put("key1", "stringValue") resultMap.put("key2", 1) resultMap.put("key3", 1.0) resultList.add(resultMap) JSON.toJSONString(result, false) 1.2.3.4.5.6.7.8.9.10.11.12. 原创作者: guotong1988 转载于: https://blog.51cto.com/guotong1988/11543364