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

Added unit test that breaks deserialization. #48

Open niemyjski opened 10 years ago

niemyjski commented 10 years ago

I believe the fix is inside of this method: public static Type[] GetGenericTypeArguments(Type type). The SettingsDictionary inherits from dictionary but doesn't have any generic type arguments. The base type would need to be checked.

niemyjski commented 10 years ago

I added

if (!IsTypeGeneric(type)) type = type.BaseType;

to that method and it fixed it. However, I'd expect the empty dictionary to be empty and not null. So it looks like there is still work todo :.

niemyjski commented 10 years ago

I was wondering if anyone has taken a look into this?

prabirshrestha commented 10 years ago

@niemyjski was on a vacation. will have a look at it this week.