maven dependence:
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.66</version>
</dependency>
//构建 json 对象
JSONObject jsonObject = new JSONObject();
jsonObject.put("market","SH");
jsonObject.put("symbol","000001");
jsonObject.put("price",1000);
System.out.println(jsonObject.toJSONString());
//解析 json 字符串
JSONObject obj = JSONObject.parseObject(jsonObject.toJSONString());