Share via


CosmosClientBuilder.WithSystemTextJsonSerializerOptions Method

Definition

Configures the CosmosClientBuilder to use System.Text.Json for serialization. Use JsonSerializerOptions to use System.Text.Json with a default configuration. If no options are specified, Newtonsoft.Json will be used for serialization instead.

public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithSystemTextJsonSerializerOptions (System.Text.Json.JsonSerializerOptions serializerOptions);
member this.WithSystemTextJsonSerializerOptions : System.Text.Json.JsonSerializerOptions -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder
Public Function WithSystemTextJsonSerializerOptions (serializerOptions As JsonSerializerOptions) As CosmosClientBuilder

Parameters

serializerOptions
JsonSerializerOptions

An instance of JsonSerializerOptions containing the system text json serializer options.

Returns

The CosmosClientBuilder object

Applies to