facebook-csharp-sdk / simple-json

JSON library for .NET 2.0+/SL4+/WP7/WindowsStore with optional support for dynamic and DataContract
MIT License
382 stars 143 forks source link

enum fix #72

Open amccorma opened 8 years ago

amccorma commented 8 years ago

serialize and deserialize enums (integers and strings)

Lakritzator commented 8 years ago

I'm just a "bystander", but what is with this commit: https://github.com/jasonmead/simple-json/commit/bf5b50f88b8b638dcebedc19294475f62806b3d6 Here the commiter also has Nullable support, maybe you can improve your code a bit?

Another note, you changed/added way to much (.sln etc) and I don't think the maintainer would merge your commits.

amccorma commented 8 years ago

https://github.com/facebook-csharp-sdk/simple-json/pull/64

SimpleJson was not deserializing enum strings/integers. I used the "master" version. I need to modify the SimpleJson.cs file to get enums to serialize and deserialize. The changes are posted in the link above.

I created a test: EnumTypeTest.cs and modified SimpleJson.cs. Added about 5 lines of code.