Is there any way to include spaces in JsonConvert.SerializeObject function?
My object gets serialized to:
{"domain":"domain.com","username":"xyz","videos":null}
Is there any way to get it like below?
{"domain": "domain.com", "username": "xyz", "videos": null}
REASON WHY I WANT IT: I receive a webpage with a lot of Json formatted like above. Some of that json (variable) needs to be replaced by custom one, in order to do this, I deserialize whole json to Dictionary, get some part, serialize and use as a first parameter in replace method.
Better explanation: Let's assume that I receive JSON like below:
{"name": "john", data:{"age": 21, "job": "programmer"}}
I want to replace "data" with my own one. In order to do so, I need to get current "data", so firstly I deserialize whole json, get "data", serialize it to string, because I want to replace it in the webpage html string, like webpage.Replace(oldData, newData), where oldData is serialized string and newData is my custom "data" string