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; }}"; } } }