JsonReader

public static class JsonReader

Methods

Load<T>

#
public static T Load<T>(NamespaceManager namespaceManager = null)
Loads the specified type from a json of the same name
Remarks: If your class name is MyNamespace.MyType, then this will attempt to load MyNamespace.MyType.json for the json definition in the same assembly. If you want to specify a different json, use Load{T}(Stream)
namespaceManager (NamespaceManager = null)
A new instance of the specified type with the contents loaded from json

Load<T>

#
public static T Load<T>(Stream stream, NamespaceManager namespaceManager = null)
Loads the specified type from the specified json stream
Remarks: If your class name is MyNamespace.MyType, then this will attempt to load MyNamespace.MyType.json for the json definition in the same assembly.
stream (Stream)json content to load (e.g. from resources)
namespaceManager (NamespaceManager = null)Namespace manager to use when loading
A new instance of the specified type with the contents loaded from the json stream

Load<T>

#
public static T Load<T>(Stream stream, T instance, NamespaceManager namespaceManager = null)
Loads the specified type from the specified json stream
stream (Stream)json content to load (e.g. from resources)
instance (T)Instance to use as the starting object, or null to create a new instance
namespaceManager (NamespaceManager = null)Namespace manager to use to lookup type names
A new or existing instance of the specified type with the contents loaded from the json stream

Load<T>

#
public static T Load<T>(TextReader reader, T instance, NamespaceManager namespaceManager = null)
Loads the specified type from the specified json reader
reader (TextReader)Reader for the json content to load
instance (T)Instance to use as the starting object, or null to create a new instance
namespaceManager (NamespaceManager = null)Namespace manager to use to lookup type names
A new or existing instance of the specified type with the contents loaded from the json stream

Load<T>

#
public static void Load<T>(T instance, NamespaceManager namespaceManager = null)
Loads the specified instance with json of the same name
Remarks: If your class name is MyNamespace.MyType, then this will attempt to load MyNamespace.MyType.json for the json definition in the same assembly. If you want to specify a different json, use Load{T}(Stream, T)
instance (T)Instance to use as the starting object
namespaceManager (NamespaceManager = null)Namespace manager to use when loading

Load<T>

#
public static void Load<T>(T instance, string resourceName, NamespaceManager namespaceManager = null)
Loads the specified instance with json from the specified embedded resource.
Remarks: This will load the embedded resource from the same assembly as instance with the specified resourceName embedded resource. If you want to specify a different json, use Load{T}(Stream, T)
instance (T)Instance to use as the starting object
resourceName (string)Fully qualified name of the embedded resource to load.
namespaceManager (NamespaceManager = null)Namespace manager to use when loading

Watch<T>

#Since v2.10
public static bool Watch<T>(T control, string fileName = null, string sourcePath = null)
Watches the .jeto file for changes and triggers the method specified by the HotReloadAttribute, if any, when the file changes. Otherwise, it will reload the xeto into the control using Load<T>(NamespaceManager).
control (T)Instance of the control to watch for changes
fileName (string = null)Name of the file to watch, or null to use the default based on the class name
sourcePath (string = null)Source path of the file to watch
true if the file is being watched, false otherwise