For example if we have {"Parameters":["name" : "test"]} it will be serialized to {"Parameters":["name"]}. (Using System.Text.Json)
Why is that?
EDIT: See this issue that brought this to my attention, and the following code that does serialization/deserialization.
EDIT 2: Added even more clarity to those that can't follow through the above given materials
var asd = new SomeObject()
{
Properties = new NameValueCollection
{
{ "test1", "ok1" },
{ "test2", "ok2" }
}
};
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize<SomeObject>(asd));
Serializes to {"Properties":["test1","test2"]}.