Show / Hide Table of Contents

Class JsonHelper

A helper class for working with JSON.

Inheritance
object
JsonHelper
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.BotScripting.dll
Syntax
public static class JsonHelper

Methods

View Source

DeserializeEnumerable(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.

View Source

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.

View Source

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.

  • View Source
In this article
Back to top Generated by DocFX