【修复】修复code_cs_unity_editor_json保存map类型数据的bug

main
walon 2022-01-26 22:48:17 +08:00
parent f617d5f10f
commit 29cf3b56f6
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ namespace Luban.Job.Cfg.TypeVisitors
public string Accept(TMap type, string jsonName, string jsonFieldName, string value) 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; }}";
} }
} }
} }