# Assembly: RestSharp.Serializers.Utf8Json

# Namespace: RestSharp.Serializers.Utf8Json

# Class RestClientExtensions

# Inheritance

object

# Syntax

public static class RestClientExtensions

# Method UseUtf8Json(IRestClient)

Use Utf8Json serializer with default formatter resolver

# Syntax
public static IRestClient UseUtf8Json(this IRestClient client)
# Parameters
Name Type Description
client IRestClient
# Returns
Type Description
IRestClient

# Method UseUtf8Json(IRestClient, IJsonFormatterResolver)

Use Utf8Json serializer with custom formatter resolver

# Syntax
public static IRestClient UseUtf8Json(this IRestClient client, IJsonFormatterResolver resolver)
# Parameters
Name Type Description
client IRestClient
resolver IJsonFormatterResolver Utf8Json deserialization formatter resolver
# Returns
Type Description
IRestClient

# Class RestRequestExtensions

# Inheritance

object

# Syntax

public static class RestRequestExtensions

# Method UseUtf8Json(IRestRequest)

# Syntax
public static IRestRequest UseUtf8Json(this IRestRequest request)
# Parameters
Name Type Description
request IRestRequest
# Returns
Type Description
IRestRequest

# Method UseNewtonsoftJson(IRestRequest, IJsonFormatterResolver)

# Syntax
public static IRestRequest UseNewtonsoftJson(this IRestRequest request, IJsonFormatterResolver resolver)
# Parameters
Name Type Description
request IRestRequest
resolver IJsonFormatterResolver
# Returns
Type Description
IRestRequest

# Class Utf8JsonSerializer

# Inheritance

IRestSerializer
  ↳ System.Object

# Syntax

public class Utf8JsonSerializer : IRestSerializer

# Constructor Utf8JsonSerializer(IJsonFormatterResolver)

# Syntax
public Utf8JsonSerializer(IJsonFormatterResolver resolver = null)
# Parameters
Name Type Description
resolver IJsonFormatterResolver

# Method Serialize(Object)

# Syntax
public string Serialize(object obj)
# Parameters
Name Type Description
obj object
# Returns
Type Description
string

# Method Serialize(Parameter)

# Syntax
public string Serialize(Parameter parameter)
# Parameters
Name Type Description
parameter Parameter
# Returns
Type Description
string

# Method Deserialize<T>(IRestResponse)

# Syntax
public T Deserialize<T>(IRestResponse response)
# Generic parameters
Name Description
T
# Parameters
Name Type Description
response IRestResponse
# Returns
Type Description
T

# Property SupportedContentTypes

# Syntax
public string[] SupportedContentTypes { get; }

# Property ContentType

# Syntax
public string ContentType { get; set; }

# Property DataFormat

# Syntax
public DataFormat DataFormat { get; }