Table of Contents

Interface IJsonSerializerBase

Namespace
Shift.Common
Assembly
Shift.Common.dll

Provides serialization and deserialization functionality to and from string values. This allows your client code to use any JSON serialization library you want (System.Text.Json or Newtonsoft.Json, for example).

public interface IJsonSerializerBase
Extension Methods

Methods

Deserialize<T>(string)

Returns a object deserialized from the input string.

T Deserialize<T>(string value)

Parameters

value string

Returns

T

Type Parameters

T

Deserialize<T>(Type, string, JsonPurpose, bool, string[])

Returns a object of the desired type, deserialized from the input string.

T Deserialize<T>(Type type, string value, JsonPurpose mode, bool disablePropertyConverters = false, string[] excludeProperties = null)

Parameters

type Type
value string
mode JsonPurpose
disablePropertyConverters bool

If true, the default JSON property converter is removed from every property of the object before it is deserialized.

excludeProperties string[]

Returns

T

Type Parameters

T

Serialize(object, JsonPurpose, bool, string[])

Returns the serialized string value for an object, excluding properties in the exclusions array.

string Serialize(object value, JsonPurpose mode, bool disablePropertyConverters = false, string[] excludeProperties = null)

Parameters

value object
mode JsonPurpose
disablePropertyConverters bool

If true, the default JSON property converter is removed from every property of the object before it is serialized.

excludeProperties string[]

Returns

string

Serialize<T>(T)

Returns the serialized string value for an object of a specific type.

string Serialize<T>(T value)

Parameters

value T

Returns

string

Type Parameters

T