public static bool LoadCategoryData(string key) { try { string file = LocalDirectory.GetCategoryDataFile(key); string json = File.ReadAllText(file); var node = (CategoryNode)JsonConvert.DeserializeObject <CategoryNode>(json); node.ProcessData(); categoryRoot.RemoveCategory(node.name); categoryRoot.branches.Add(node); return(true); } catch (Exception ex) { Logger.Add(ex.Message, "LoadCategoryData(" + key + ")"); return(false); } }