Open GoogleCodeExporter opened 9 years ago
I don't understand what the issue is. Can you give more of a code sample?
With what type are you constructing the serializer? The 2 is a numeric
expression, inside the [] it will be an array.
Original comment by elliott....@gmail.com
on 24 Aug 2013 at 2:46
I feel the framework is treating any string starting with [ and not having a ,
as a numeric expression. But I may be wrong, please look at the code samples
below.
Serializer s = new Serializer(typeof(List<int>));
List<int> x = (List<int>)s.Deserialize("[2]"); //gives me a numeric expression
error
List<int> x = (List<int>)s.Deserialize(" [2]"); //works as expected
Serializer s = new Serializer(typeof(List<String>));
List<String> x = (List<String>)s.Deserialize("[\"2\"]"); //gives me a numeric
expression error
List<String> x = (List<String>)s.Deserialize(" [\"2\"]"); //works as expected
Somehow a simple fix of adding a " "(space) in front solves the problem.
Original comment by 0Su...@gmail.com
on 24 Aug 2013 at 5:27
I'm unable to reproduce the issue. It's working fine for me. Are you in a
different locale? What framework and OS is this running on?
Original comment by elliott....@gmail.com
on 28 Aug 2013 at 2:26
Original comment by elliott....@gmail.com
on 28 Aug 2013 at 2:27
Original issue reported on code.google.com by
0Su...@gmail.com
on 23 Aug 2013 at 6:49