I serialize an object by JsonConvert.SerializeObject and then deserilize by JsonConvert.DeserializeObject, I have a stack in serialized object, the problem i'm facing is when I deserilize the serialized object, the stack that I get is in reversed order that is when I pop an element, instead of returning the recently pushed element, it returns first pushed element. How to overcome this problem?
Asked
Active
Viewed 37 times
0
-
one workaround would be to first reverse the stack and then serialize it. then after deserializing it should be normal again – slow Mar 08 '18 at 10:57
-
please share some example and code snippets you are using. that would be more helpful – Mihir Dave Mar 08 '18 at 11:01