次の方法で共有


CosmosClientOptions.Serializer プロパティ

定義

省略可能な JSON シリアライザーを設定する を取得します。 クライアントはそれを使用して、ユーザーの cosmos 要求/応答をシリアル化またはシリアル化解除します。 DatabaseProperties や ContainerProperties などの SDK 所有型では、常に SDK の既定のシリアライザーが使用されます。

public Azure.Cosmos.Serialization.CosmosSerializer Serializer { get; set; }
member this.Serializer : Azure.Cosmos.Serialization.CosmosSerializer with get, set
Public Property Serializer As CosmosSerializer

プロパティ値

カスタム シリアライザーを設定する方法の例。 基本的なシリアライザー オプションについては、「CosmosSerializationOptions CosmosSerializer ignoreNullSerializer = new MyCustomIgnoreNullSerializer();

CosmosClientOptions clientOptions = new CosmosClientOptions() { Serializer = ignoreNullSerializer };

CosmosClient クライアント = 新しい CosmosClient("endpoint", "key", clientOptions);

適用対象