public static void SaveConfigToJson(string configFolder) { IList <ArticleConfigNameJson> configList = new List <ArticleConfigNameJson>() { new ArticleConfigNameJson() { Code = "FACT_UNKNOWN", Role = "ARTICLE_UNKNOWN", ResolvePath = new string[] { } }, new ArticleConfigNameJson() { Code = "FACT_CONTRACT_TERM", Role = "ARTICLE_CONTRACT_TERM", ResolvePath = new string[] { } }, new ArticleConfigNameJson() { Code = "FACT_POSITION_TERM", Role = "ARTICLE_POSITION_TERM", ResolvePath = new string[] { "FACT_CONTRACT_TERM" } }, }; string configFilePath = System.IO.Path.Combine(configFolder, "ARTICLES_CONFIG.JSON"); ConfigJsonReader.SaveJsonData <ArticleConfigNameJson>(configFilePath, configList); }
public static void loadConfigFromJson(string configFolder) { string configFilePath = System.IO.Path.Combine(configFolder, "ARTICLES_CONFIG.JSON"); IList <ArticleConfigNameJson> configList = ConfigJsonReader.ReadJsonData <ArticleConfigNameJson>(configFilePath); }