Class SystemTextJsonSerializer
- Namespace
- RestSharp.Serializers.Json
- Assembly
- RestSharp.dll
public class SystemTextJsonSerializer : IRestSerializer, ISerializer, IDeserializer
- Inheritance
-
SystemTextJsonSerializer
- Implements
- Inherited Members
Constructors
SystemTextJsonSerializer()
Create the new serializer that uses System.Text.Json.JsonSerializer with default settings
public SystemTextJsonSerializer()
SystemTextJsonSerializer(JsonSerializerOptions)
Create the new serializer that uses System.Text.Json.JsonSerializer with custom settings
public SystemTextJsonSerializer(JsonSerializerOptions options)
Parameters
optionsJsonSerializerOptionsJson serializer settings
Properties
AcceptedContentTypes
public string[] AcceptedContentTypes { get; }
Property Value
- string[]
ContentType
public string ContentType { get; set; }
Property Value
DataFormat
public DataFormat DataFormat { get; }
Property Value
Deserializer
public IDeserializer Deserializer { get; }
Property Value
Serializer
public ISerializer Serializer { get; }
Property Value
SupportsContentType
public SupportsContentType SupportsContentType { get; }
Property Value
Methods
Deserialize<T>(RestResponse)
public T? Deserialize<T>(RestResponse response)
Parameters
responseRestResponse
Returns
- T
Type Parameters
T
Serialize(Parameter)
public string? Serialize(Parameter bodyParameter)
Parameters
bodyParameterParameter
Returns
Serialize(object?)
public string? Serialize(object? obj)
Parameters
objobject