Skip to content

Instantly share code, notes, and snippets.

@manishtiwari25
Created January 10, 2024 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manishtiwari25/a828ea4a178a0778cdf929a8e5457679 to your computer and use it in GitHub Desktop.
Save manishtiwari25/a828ea4a178a0778cdf929a8e5457679 to your computer and use it in GitHub Desktop.
JsonSerializerOptions jsonSerializerOptions = new JsonSerializerOptions()
{
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
};
CosmosSystemTextJsonSerializer cosmosSystemTextJsonSerializer = new CosmosSystemTextJsonSerializer(jsonSerializerOptions);
CosmosClientOptions cosmosClientOptions = new CosmosClientOptions()
{
ApplicationName = "Test",
Serializer = cosmosSystemTextJsonSerializer
};
var client = new CosmosClient(endpoint, authKey, cosmosClientOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment