Class JsonHelper
A helper class for working with JSON.
Inherited Members
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.BotScripting.dll
Syntax
public static class JsonHelper
Methods
View SourceDeserializeEnumerable(string, Type)
Deserializes an enumeration of items.
Declaration
public static IEnumerable DeserializeEnumerable(string data, Type itemType)
Parameters
Type | Name | Description |
---|---|---|
string | data | The serialized JSON data. |
Type | itemType | The item type. |
Returns
Type | Description |
---|---|
IEnumerable | An enumeration of items. |
DeserializeEnumerable<T>(string)
Deserializes an enumeration of items.
Declaration
public static IEnumerable<T> DeserializeEnumerable<T>(string data)
Parameters
Type | Name | Description |
---|---|---|
string | data | The serialized JSON data. |
Returns
Type | Description |
---|---|
IEnumerable<T> | An enumeration of items. |
Type Parameters
Name | Description |
---|---|
T | The item type. |
DeserializeExportedEnumerable<T>(string, IServiceProvider)
Deserializes an enumeration of items using an export provider.
Declaration
public static IEnumerable<T> DeserializeExportedEnumerable<T>(string data, IServiceProvider services) where T : notnull
Parameters
Type | Name | Description |
---|---|---|
string | data | The serialized JSON data. |
IServiceProvider | services | The service provider. |
Returns
Type | Description |
---|---|
IEnumerable<T> | An enumeration of items. |
Type Parameters
Name | Description |
---|---|
T | The item type. |