From 5a3dd7541569d0529d9dbd5c05cf649be9044756 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 26 Oct 2022 16:54:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20js?= =?UTF-8?q?on=E5=8F=8D=E5=BA=8F=E5=88=97=E5=8C=96=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8D=95=E5=80=BC=E8=BD=AC=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018929 --user=陈建星 【测试跟踪】导入7000+用例-选择xmind格式-导入失败 https://www.tapd.cn/55049933/s/1278442 --- .../sdk/src/main/java/io/metersphere/commons/utils/JSON.java | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/JSON.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/JSON.java index 1dc06389a1..567a2c362b 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/JSON.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/commons/utils/JSON.java @@ -26,6 +26,7 @@ public class JSON { objectMapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY); // 如果一个对象中没有任何的属性,那么在序列化的时候就会报错 objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); + objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); } public static String toJSONString(Object value) {