While playing around Stack collection in C# I encountered the following issue. Exactly I am not sure why it is happening. Please put some light on the reason and alternative
If you try to debug it then you will notice that items order is broken after Stack
deserialization.
The same question has been asked on JSON.NET GitHub issue tracker a month ago.
The answer from JamesNK:
I'm afraid this is a limition of a Stack. The results returned when it is serialized and the opposite order for when it is deserialized.