JsonReader
Methods
Load<T>
#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)
Parameters:
| namespaceManager (NamespaceManager = null) |
Returns: A new instance of the specified type with the contents loaded from json
Load<T>
#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.
Parameters:
| stream (Stream) | json content to load (e.g. from resources) |
| namespaceManager (NamespaceManager = null) | Namespace manager to use when loading |
Returns: A new instance of the specified type with the contents loaded from the json stream
Load<T>
#Loads the specified type from the specified json stream
Parameters:
| 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 |
Returns: A new or existing instance of the specified type with the contents loaded from the json stream
Load<T>
#Loads the specified type from the specified json
readerParameters:
| 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 |
Returns: A new or existing instance of the specified type with the contents loaded from the json stream
Load<T>
#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)
Parameters:
| 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)Parameters:
| 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 |
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).