Dialog.JsonElement Class
RootElement that is instantiated from a Json source.

See Also: JsonElement Members

Syntax

public class JsonElement : RootElement

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:

c# Example

    var je = new JsonElement ("Dynamic Data", "http://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:

c# Example


    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 Dialog for details on the markup.

Requirements

Namespace: Dialog
Assembly: Dialog-1 (in Dialog-1.dll)
Assembly Versions: 0.0.0.0