Interface IJsonSerializerBase
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
valuestring
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
typeTypevaluestringmodeJsonPurposedisablePropertyConvertersboolIf true, the default JSON property converter is removed from every property of the object before it is deserialized.
excludePropertiesstring[]
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
valueobjectmodeJsonPurposedisablePropertyConvertersboolIf true, the default JSON property converter is removed from every property of the object before it is serialized.
excludePropertiesstring[]
Returns
Serialize<T>(T)
Returns the serialized string value for an object of a specific type.
string Serialize<T>(T value)
Parameters
valueT
Returns
Type Parameters
T