Instead of incorporating code as per the answer given in the question above, provide a client option that automatically uses the System.Text.Json serializer, for example, an option such as:
This simple change would allow us to use the System.Text.Json serializer with the Cosmos SDK (v3) without having to manually incorporate the code above.
When creating a Cosmos DB client, allow an option that will use the System.Text.Json serializer instead of Newtonsoft.
As per the StackOverflow question: https://stackoverflow.com/questions/78604777/why-is-azure-cosmosdb-saving-dictionary-object-values-as-valuekind-number.
Instead of incorporating code as per the answer given in the question above, provide a client option that automatically uses the System.Text.Json serializer, for example, an option such as:
UseSystemTextJson = true
When the option is true, the "Serializer" can be set internally using the code from: https://github.com/Azure/azure-cosmos-dotnet-v3/tree/master/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson
This simple change would allow us to use the System.Text.Json serializer with the Cosmos SDK (v3) without having to manually incorporate the code above.
Thank-you for your consideration.