JsonElement JsonElement Class

Definition

RootElement that is instantiated from a Json source.

public class JsonElement : MonoTouch.Dialog.RootElement
type JsonElement = class
    inherit RootElement
Inheritance

Remarks

The JsonElement is a sublcass of RootElement that extends a RootElement to be able to load the contents of nested child from a local or remote url.

The JsonElement is a RootElement that can be instantiated in two forms. One version creates a RootElement that will load the contents on demand, these are created by using the JsonElement constructors, which take an extra argument at the end, the url to load the contents from:


    var je = new JsonElement ("Dynamic Data", "https://tirania.org/tmp/demo.json");

The other form creates the data from a local file or an existing System.Json.JsonObject that you have already parsed:


var je = JsonElement.FromFile ("json.sample");

using (var reader = File.OpenRead ("json.sample"))
    return JsonElement.FromJson (JsonObject.Load (reader) as JsonObject, arg);

See the README.markdown included with MonoTouch.Dialog for details on the markup.

Constructors

JsonElement(String, Group, String) JsonElement(String, Group, String)

Creates a RootElement with its nested content from the contents of the Json file at the specified url.

JsonElement(String, Int32, Int32, String) JsonElement(String, Int32, Int32, String)

Creates a RootElement with its nested content from the contents of the Json file at the specified url.

JsonElement(String, String) JsonElement(String, String)

Creates a RootElement with its nested content from the contents of the Json file at the specified url.

Fields

Caption Caption

The caption to display for this given element

(Inherited from Element)
createOnSelected createOnSelected

Delegate invoked when the RootElement is tapped.

(Inherited from RootElement)
NeedColorUpdate NeedColorUpdate

Set to direct the DialogViewController to call the WillDisplay method on cells that implement IColorizeBackground.

(Inherited from RootElement)
Parent Parent

Handle to the container object.

(Inherited from Element)
TableView TableView

The UITableView that is rendering the current RootElement.

(Inherited from RootElement)
UnevenRows UnevenRows

Reports whether the rows have all the same size or not.

(Inherited from RootElement)
Url Url

The url to load if the element is selected.

Properties

CellKey CellKey

Subclasses that override the GetCell method should override this method as well

(Inherited from Element)
Count Count

Number of sections in this RootElement.

(Inherited from RootElement)
DateKind DateKind
IndexPath IndexPath

Returns the IndexPath of a given element. This is only valid for leaf elements, it does not work for a toplevel RootElement or a Section of if the Element has not been attached yet.

(Inherited from Element)
Item[Int32] Item[Int32]

Returns the section at the specified index.

(Inherited from RootElement)
Item[String] Item[String]

Looks up a specific Element from the Json dictionary which had its "id" property set to the same value as the key

RadioSelected RadioSelected

The currently selected Radio item in the whole Root.

(Inherited from RootElement)

Methods

Add(IEnumerable<Section>) Add(IEnumerable<Section>)

Adds all of the sections in the IEnumerable to this root element.

(Inherited from RootElement)
Add(Section) Add(Section)

Adds a new section to this RootElement

(Inherited from RootElement)
Clear() Clear()

Removes all the sections from this RootElement.

(Inherited from RootElement)
Deselected(DialogViewController, UITableView, NSIndexPath) Deselected(DialogViewController, UITableView, NSIndexPath) Inherited from Element
Dispose() Dispose() Inherited from Element
Dispose(Boolean) Dispose(Boolean)

Releases the resources held by this RootElement and its children.

(Inherited from RootElement)
FromFile(String) FromFile(String)

Creates a RootElement with its nested content from the contents of the Json file at the specified path.

FromFile(String, Object) FromFile(String, Object)

Creates a RootElement with its nested content from the contents of the Json file at the specified path.

FromJson(JsonElement, JsonObject, Object) FromJson(JsonElement, JsonObject, Object)

Creates a RootElement with its nested content from the contents of the Json object..

FromJson(JsonObject) FromJson(JsonObject)

Creates a RootElement with its nested content from the contents of the Json object..

FromJson(JsonObject, Object) FromJson(JsonObject, Object)

Creates a RootElement with its nested content from the contents of the Json object..

GetActiveCell() GetActiveCell() Inherited from Element
GetCell(UITableView) GetCell(UITableView)
GetContainerTableView() GetContainerTableView() Inherited from Element
GetImmediateRootElement() GetImmediateRootElement()

If the cell is attached will return the immediate RootElement

(Inherited from Element)
Insert(Int32, Section) Insert(Int32, Section)

Inserts a new section into the RootElement

(Inherited from RootElement)
Insert(Int32, UITableViewRowAnimation, Section[]) Insert(Int32, UITableViewRowAnimation, Section[]) Inherited from RootElement
MakeViewController() MakeViewController() Inherited from RootElement
Matches(String) Matches(String)

Method invoked to determine if the cell matches the given text, never invoked with a null value or an empty string.

(Inherited from Element)
Prepare() Prepare() Inherited from RootElement
PrepareDialogViewController(UIViewController) PrepareDialogViewController(UIViewController) Inherited from RootElement
Reload(Element, UITableViewRowAnimation) Reload(Element, UITableViewRowAnimation) Inherited from RootElement
Reload(Section, UITableViewRowAnimation) Reload(Section, UITableViewRowAnimation) Inherited from RootElement
Remove(Section) Remove(Section)

Removes the specified section from this RootElement using the default animation.

(Inherited from RootElement)
Remove(Section, UITableViewRowAnimation) Remove(Section, UITableViewRowAnimation) Inherited from RootElement
RemoveAt(Int32) RemoveAt(Int32)

Removes a section at a specified location using the default animation.

(Inherited from RootElement)
RemoveAt(Int32, UITableViewRowAnimation) RemoveAt(Int32, UITableViewRowAnimation) Inherited from RootElement
Selected(DialogViewController, UITableView, NSIndexPath) Selected(DialogViewController, UITableView, NSIndexPath)
Summary() Summary()

Returns a summary of the value represented by this object, suitable for rendering as the result of a RootElement with child objects.

(Inherited from Element)

Explicit Interface Implementations

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Enumerator that returns all the sections in the RootElement.

(Inherited from RootElement)
IEnumerable<Section>.GetEnumerator() IEnumerable<Section>.GetEnumerator()

Enumerator that returns all the sections in this RootElement.

(Inherited from RootElement)

Applies to