From 0952b270a1826c0f6aa2c54562dd07902afd024d Mon Sep 17 00:00:00 2001 From: q4speed Date: Fri, 18 Sep 2020 10:40:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8F=E8=A7=88=E5=99=A8=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=BD=95=E5=88=B6=E7=9A=84=E8=84=9A=E6=9C=AC=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=88=B0=E6=B5=8B=E8=AF=95=E5=B9=B3=E5=8F=B0=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=A1=BA=E5=BA=8F=E5=8F=91=E7=94=9F=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #396 --- backend/src/main/java/io/metersphere/api/parse/MsParser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/parse/MsParser.java b/backend/src/main/java/io/metersphere/api/parse/MsParser.java index 4e9c90f5b5..065a4e8da1 100644 --- a/backend/src/main/java/io/metersphere/api/parse/MsParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/MsParser.java @@ -3,6 +3,7 @@ package io.metersphere.api.parse; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.Feature; import io.metersphere.api.dto.ApiTestImportRequest; import io.metersphere.api.dto.parse.ApiImport; import io.metersphere.api.dto.scenario.request.RequestType; @@ -23,7 +24,7 @@ public class MsParser extends ApiImportAbstractParser { } private String parsePluginFormat(String testStr) { - JSONObject testObject = JSONObject.parseObject(testStr); + JSONObject testObject = JSONObject.parseObject(testStr, Feature.OrderedField); if (testObject.get("scenarios") != null) { return testStr; } else {