解决乱码问题

This commit is contained in:
seagull 2019-04-13 14:40:29 +08:00
parent c8593ad1a8
commit 17b2026f5e
1 changed files with 1 additions and 1 deletions

View File

@ -325,7 +325,7 @@ public class SubString {
try {
// JSONArray jsonarr = JSONArray.parseArray(json);
// 直接使用fastjson的接口实现有序解析
JSONArray jsonarr = JSONArray.parseObject(json.getBytes(), JSONArray.class, Feature.OrderedField);
JSONArray jsonarr = JSONArray.parseObject(json.getBytes("UTF-8"), JSONArray.class, Feature.OrderedField);
for (int i = 0; i < jsonarr.size(); i++) {
JSONObject jsonStr = jsonarr.getJSONObject(i);
parseJsonString(jsonStr.toJSONString(), key, index);