public JObject Apply(JObject json) { var profileId = _manager.CreateNewProfile(); var profile = _manager.GetProfile(profileId); var loader = new JsonConfigLoader(); var finalizer = new JsonValueToEnum(); json = loader.LoadConfig(json); json = finalizer.Apply(json); profile.SetProperties(json); profile.SetProperty("profile.name", "Profile 1"); var visibleChannels = profile.GetProperty <List <int> >("behaviour.channel.visible"); visibleChannels.Add((int)0x01FFFF /*GOBCHAT_INFO*/); visibleChannels.Add((int)0x02FFFF /*GOBCHAT_ERROR*/); profile.SetProperty("behaviour.channel.visible", visibleChannels); var result = new JObject(); result["version"] = 2; result["activeProfile"] = profileId; return(result); }