diff --git a/src/Luban.Job.Cfg/Source/DataCreators/JsonDataCreator.cs b/src/Luban.Job.Cfg/Source/DataCreators/JsonDataCreator.cs index e523576..c676a4e 100644 --- a/src/Luban.Job.Cfg/Source/DataCreators/JsonDataCreator.cs +++ b/src/Luban.Job.Cfg/Source/DataCreators/JsonDataCreator.cs @@ -67,7 +67,7 @@ namespace Luban.Job.Cfg.DataCreators public DType Accept(TEnum type, JsonElement x, DefAssembly ass) { - return new DEnum(type, x.GetString()); + return new DEnum(type, x.ToString()); } public DType Accept(TString type, JsonElement x, DefAssembly ass) diff --git a/src/Luban.Job.Cfg/Source/DataCreators/YamlDataCreator.cs b/src/Luban.Job.Cfg/Source/DataCreators/YamlDataCreator.cs index b3e7e9a..6be3b9b 100644 --- a/src/Luban.Job.Cfg/Source/DataCreators/YamlDataCreator.cs +++ b/src/Luban.Job.Cfg/Source/DataCreators/YamlDataCreator.cs @@ -23,7 +23,7 @@ namespace Luban.Job.Cfg.DataCreators private static string GetTextValue(YamlNode node) { - return ((string)node); + return node.ToString(); } public DType Accept(TBool type, YamlNode x, DefAssembly y)