From e977a363ef662ba806d6f506c7143562db09953c Mon Sep 17 00:00:00 2001 From: walon Date: Thu, 24 Feb 2022 10:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=B0=83=E6=95=B4=E3=80=91json?= =?UTF-8?q?=E3=80=81xml=E3=80=81lua=E3=80=81yaml=E7=AD=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90=E6=94=AF=E6=8C=81int=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=9A=84enum=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Luban.Job.Cfg/Source/DataCreators/JsonDataCreator.cs | 2 +- src/Luban.Job.Cfg/Source/DataCreators/YamlDataCreator.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)