Skip to content

Deserialize Method ​

Definition ​

  • Namespace: JASE.Serializers
  • Assembly: JASE.Serializers.dll

Overloads ​

NameDescription
T Deserialize(byte[] json, JsonSerializerOptions options = null)Deserialize a JSON byte[] into an object type
T Deserialize(Stream json, JsonSerializerOptions options = null)Deserialize JSON from a Stream into an object of type T.
T Deserialize(string json, JsonSerializerOptions options = null)Deserialize a JSON string into an object type
object Deserialize(byte[] json, Type type, JsonSerializerOptions options = null)Deserialize a JSON byte[] into an object type
object Deserialize(Stream json, Type type, JsonSerializerOptions options = null)Deserialize JSON from a Stream into an object of the specified type.
object Deserialize(string json, Type type, JsonSerializerOptions options = null)Deserialize a JSON string into an object type

object Deserialize(byte[] json, Type type, JsonSerializerOptions options = null) ​

csharp
object Deserialize(byte[] json, Type type, JsonSerializerOptions options = null)

Deserialize a JSON byte[] into an object type

Returns ​

Object T

object Deserialize(Stream json, Type type, JsonSerializerOptions options = null) ​

csharp
object Deserialize(Stream json, Type type, JsonSerializerOptions options = null)

Deserialize JSON from a Stream into an object of the specified type.

Parameters ​

NameDescription
jsonA stream containing UTF-8 encoded JSON.
optionsOptional JsonSerializerOptions; if null, uses library defaults.
typeThe type to deserialize to.

Returns ​

The deserialized object.

object Deserialize(string json, Type type, JsonSerializerOptions options = null) ​

csharp
object Deserialize(string json, Type type, JsonSerializerOptions options = null)

Deserialize a JSON string into an object type

Returns ​

Object

T Deserialize(byte[] json, JsonSerializerOptions options = null) ​

csharp
T Deserialize(byte[] json, JsonSerializerOptions options = null)

Deserialize a JSON byte[] into an object type

Returns ​

Object T

T Deserialize(Stream json, JsonSerializerOptions options = null) ​

csharp
T Deserialize(Stream json, JsonSerializerOptions options = null)

Deserialize JSON from a Stream into an object of type T.

Type parameters ​

NameDescription
TThe type to deserialize to.

Parameters ​

NameDescription
jsonA stream containing UTF-8 encoded JSON.
optionsOptional JsonSerializerOptions; if null, uses library defaults.

Returns ​

The deserialized instance of T.

T Deserialize(string json, JsonSerializerOptions options = null) ​

csharp
T Deserialize(string json, JsonSerializerOptions options = null)

Deserialize a JSON string into an object type

Returns ​

Object T