Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better custom type, fix List & Dictionary deserialization #69

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gekailin
Copy link

@gekailin gekailin commented Feb 1, 2018

No description provided.

@mgholam
Copy link
Owner

mgholam commented Feb 1, 2018

Thanks but it will break existing use of RegisterCustomType()

@ariitx
Copy link

ariitx commented Mar 2, 2018

Hi, I am not sure this is related, but I found that if the custom type contains "Dictionary" in the class name, fastJSON always throws the following when deserialize.

System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.Dictionary2[System.String,System.Object]' to type 'System.Collections.Generic.List1[System.Object]'.
at fastJSON.deserializer.ParseDictionary(Dictionary2 d, Dictionary2 globaltypes, Type type, Object input)
at fastJSON.deserializer.ToObject(String json, Type type)
at fastJSON.JSON.ToObject(String json, Type type)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants