Answer the question
In order to leave comments, you need to log in
What happens when you deserialize an empty list?
There is json
{
list: []
}
List<long> list { get; set; }
List<long> list = new List<long>();
Answer the question
In order to leave comments, you need to log in
With standard settings:
1. When deserializing, you will get an empty list
2. When serializing, you will get json from the example.
It is very easy to check on your own, the computer will not break from this.
https://dotnetfiddle.net/Nsf8Bb
And it would be faster than asking a question here, I think.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question