From dc47cec8bdcc548139aa44c689e10aff4f677c6d Mon Sep 17 00:00:00 2001 From: huyufei Date: Mon, 1 Jul 2024 20:41:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=20J?= =?UTF-8?q?son=20=E8=A7=A3=E6=9E=90=E7=9A=84=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huyufei --- Runtime/GuruCore/Runtime/Common/JsonParser.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Runtime/GuruCore/Runtime/Common/JsonParser.cs b/Runtime/GuruCore/Runtime/Common/JsonParser.cs index 0b3bf7f..85008a8 100644 --- a/Runtime/GuruCore/Runtime/Common/JsonParser.cs +++ b/Runtime/GuruCore/Runtime/Common/JsonParser.cs @@ -52,7 +52,10 @@ namespace Guru try { // return JsonMapper.ToObject(jsonStr); - return JsonConvert.DeserializeObject(jsonStr); + return JsonConvert.DeserializeObject(jsonStr, new JsonSerializerSettings() + { + ObjectCreationHandling = ObjectCreationHandling.Replace, + }); } catch (Exception e) {