Merge branch 'master' of github.com:fit2cloudrd/metersphere-server into master

This commit is contained in:
Captain.B 2020-09-18 10:56:45 +08:00
commit afcbe9bcdc
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package io.metersphere.api.parse;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import io.metersphere.api.dto.ApiTestImportRequest; import io.metersphere.api.dto.ApiTestImportRequest;
import io.metersphere.api.dto.parse.ApiImport; import io.metersphere.api.dto.parse.ApiImport;
import io.metersphere.api.dto.scenario.request.RequestType; import io.metersphere.api.dto.scenario.request.RequestType;
@ -23,7 +24,7 @@ public class MsParser extends ApiImportAbstractParser {
} }
private String parsePluginFormat(String testStr) { private String parsePluginFormat(String testStr) {
JSONObject testObject = JSONObject.parseObject(testStr); JSONObject testObject = JSONObject.parseObject(testStr, Feature.OrderedField);
if (testObject.get("scenarios") != null) { if (testObject.get("scenarios") != null) {
return testStr; return testStr;
} else { } else {