Class JsonExtensions
Helper class for JSON serialization/deserialization.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.EntityFrameworkCore.Storage
Assembly: IRM.EntityFrameworkCore.Storage.Json.dll
Syntax
public static class JsonExtensions
Methods
Deserialize<T>(String)
Deserialize JSON string to object with default options.
Declaration
public static T Deserialize<T>(this string json)
where T : class
Parameters
String
json
|
Returns
T
|
Type Parameters
T
|
Deserialize<T>(String, JsonSerializerOptions)
Deserialize JSON string to object with specified options
.
Declaration
public static T Deserialize<T>(this string json, JsonSerializerOptions options)
where T : class
Parameters
String
json
|
System.Text.Json.JsonSerializerOptions
options
|
Returns
T
|
Type Parameters
T
|
Serialize<T>(T)
Serialize object to JSON string with default options.
Declaration
public static string Serialize<T>(this T obj)
where T : class
Parameters
T
obj
|
Returns
String
|
Type Parameters
T
|
Serialize<T>(T, JsonSerializerOptions)
Serialize object to JSON string with specified options
.
Declaration
public static string Serialize<T>(this T obj, JsonSerializerOptions options)
where T : class
Parameters
T
obj
|
System.Text.Json.JsonSerializerOptions
options
|
Returns
String
|
Type Parameters
T
|