TARGET: Store data to Cosmos DB without beautifying the json (remove white spaces)
PROBLEM: New Document is createed in CosmosDB with beautified, but it has white spaces in the content memory size of the document is almost 100kb. copied the content into a physical text file and removed the spaces so memory size only 50kb. My understanding from the azure cosmos db documentation price will calculate based on the storage of the documents and throughout is that correct ?
I tried like below by storing whole json into a object, Is there any other best possible way to decrease the size of the document.
[{
"users": "[{name: \"UserName1\"}, {name: \"UserName2\"}, {name: \"UserName3\"}]",
"id": "93EC171E-XXXXXXX-9AEB9783EDD8",
"_rid": "L5puALzZZQAwawMAAAAAAA==",
"_self": "dbs/L5puAA==/colls/L5puALzZZQA=/docs/L5puALzZZQAwawMAAAAAAA==/",
"_etag": "\"0f0046dc-0000-2900-0000-60a5781c0000\"",
"_attachments": "attachments/",
"_ts": 1621456924
}
]
I would appreciate help and tips to make best possible way.