From 29cf3b56f6d5e939a8a39fc3c47406640ce11278 Mon Sep 17 00:00:00 2001 From: walon Date: Wed, 26 Jan 2022 22:48:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dcode=5Fcs=5Funity=5Feditor=5Fjson=E4=BF=9D=E5=AD=98map?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=95=B0=E6=8D=AE=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Luban.Job.Cfg/Source/TypeVisitors/CsEditorJsonSave.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Luban.Job.Cfg/Source/TypeVisitors/CsEditorJsonSave.cs b/src/Luban.Job.Cfg/Source/TypeVisitors/CsEditorJsonSave.cs index 93c8759..62804de 100644 --- a/src/Luban.Job.Cfg/Source/TypeVisitors/CsEditorJsonSave.cs +++ b/src/Luban.Job.Cfg/Source/TypeVisitors/CsEditorJsonSave.cs @@ -121,7 +121,7 @@ namespace Luban.Job.Cfg.TypeVisitors public string Accept(TMap type, string jsonName, string jsonFieldName, string value) { - return $"{{ var __cjson = new JSONArray(); foreach(var _e in {value}) {{ var __entry = new JSONArray(); {type.KeyType.Apply(this, "__entry", "null", "_e.Key")} {type.ValueType.Apply(this, "__entry", "null", "_e.Value")} }} {jsonName}[\"{jsonFieldName}\"] = __cjson; }}"; + return $"{{ var __cjson = new JSONArray(); foreach(var _e in {value}) {{ var __entry = new JSONArray(); __cjson[null] = __entry; {type.KeyType.Apply(this, "__entry", "null", "_e.Key")} {type.ValueType.Apply(this, "__entry", "null", "_e.Value")} }} {jsonName}[\"{jsonFieldName}\"] = __cjson; }}"; } } }