Closed alexeymarkov closed 3 years ago
Thanks for raising this @alexeymarkov.
To fix this I might need to implement additional functions for just passing/returning raw JSON payloads instead of converting them to/from objects. Being .NET objects these can't have duplicate key names. Therefore we'd need to support not performing any JSON -> Object conversion.
E.g. New-CosmosDbDocumentJson Set-CosmosDbDocumentJson
The Get-CosmosDbDocumentJson
function already exists to address this problem.
I'll work on this tomorrow.
Further on thinking on this, I might just add a -ReturnJson
switch to the functions instead and document the purpose is to allow for this condition.
It is not possible to add records where key names differ by case only. For example,
{ "key": "value", "Key": "Value" }
although this is a valid Cosmos Db document.The problem is at line
ConvertFrom-Json