/// <summary>parse a json object into a Config Option</summary> /// <param name="json">converts the json object to a ConfigOption</param> public static ConfigOption Parse(JObject json) { ConfigOption co = new ConfigOption(); co.IsRequired = (bool?)json["is_required"]; co.DefaultValue = (string)json["default_value"]; co.Format = (string)json["format"]; co.Rows = (string)json["rows"]; return co; }
/// <summary>Constructor</summary> /// <param name="json">json object to parse into a Config</param> public static Config Parse(JObject json) { Config c = new Config(); c.Option = ConfigOption.Parse((JObject)json["options"]); c.Context = ConfigContext.Parse((JObject)json["context"]); c.ID = (string)json["id"]; return(c); }
/// <summary>parse a json object into a Config Option</summary> /// <param name="json">converts the json object to a ConfigOption</param> public static ConfigOption Parse(JObject json) { ConfigOption co = new ConfigOption(); co.IsRequired = (bool?)json["is_required"]; co.DefaultValue = (string)json["default_value"]; co.Format = (string)json["format"]; co.Rows = (string)json["rows"]; return(co); }
/// <summary>Constructor</summary> /// <param name="json">json object to parse into a Config</param> public static Config Parse(JObject json) { var c = new Config { JsonFromResponse = json, Option = ConfigOption.Parse((JObject)json["options"]), Context = ConfigContext.Parse((JObject)json["context"]), ID = (string)json["id"], }; return(c); }
/// <summary>parse a json object into a Config Option</summary> /// <param name="json">converts the json object to a ConfigOption</param> public static ConfigOption Parse(JObject json) { var co = new ConfigOption { JsonFromResponse = json, IsRequired = (bool?) json["is_required"], DefaultValue = (string) json["default_value"], Format = (string) json["format"], Rows = (string) json["rows"], }; return co; }
/// <summary>parse a json object into a Config Option</summary> /// <param name="json">converts the json object to a ConfigOption</param> public static ConfigOption Parse(JObject json) { var configOption = new ConfigOption { JsonFromResponse = json, IsRequired = (bool?)json["is_required"], DefaultValue = (string)json["default_value"], Format = (string)json["format"], Rows = (string)json["rows"] }; return(configOption); }