I've read here Is the order of elements in a JSON list preserved?
that the order in Json matters.
I've also read here Does List<T> guarantee insertion order? that the insert order in a C# generic list is guaranteed.
Can I therefor assume that when I use the newtonsoft JsonSerializer to read this Json
"answers": [
{
"choice": "36"
},
{
"choice": "50"
}
]
in an object with a property 'Answers' which is of type GenericList, that Answers[0] always returns 36 and Answers[1] always returns 50?
Or is it possible the JsonSerializer shuffles data around?
The reason I ask is that I read data from an external API and they say "you should only get 1 answer back, but when you get more, use the last one", and the last is the last one in text, so in this case the '50'.