MonoTouch.Dialog.JsonBindingContext._parseElement C# (CSharp) Method

_parseElement() private method

private _parseElement ( System.Json.JsonObject json, Section section, JsonValue data ) : void
json System.Json.JsonObject
section Section
data System.Json.JsonValue
return void
		private void _parseElement(JsonObject json, Section section, JsonValue data){
			string type = "Unknown";
			try {
				type = json["type"];
				if (type=="HiddenElement"){
					var name = json.s("id");
					
					_controller.SetValue(name, data==null? json.s("value") : data.CleanString());	
				} else {
					string id = (json.ContainsKey("id") ? json["id"] : null);
					var newElement = _parseFunctions[type](json, _controller, data);
					if (newElement!=null) {
						newElement.ID = id;
						_elements.Add(newElement);
						section.Add(newElement);
					}
				}
			} catch (Exception e){
				Console.WriteLine("Problem parsing element. Element was skipped. Type: "+type+" = " + e.ToString());
			}
		}