We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I reproduced this using versions of Thoth.Json 4.0 and Thoth.Json.Net 4.1.
This is an example of a JSON generated using Decode.Auto from a Fable app (Thoth.Json):
"Customer":["Verified",{"comparer":{},"tree":["MapOne","CustomerIdentity",{"Id":1,"PhoneNumber":"12345678"}]}]
Thoth.Json.Net fails to decode this string because it doesn't expect comparer node. If I serialize the same data using Thoth.Json.Net, it works fine:
"Customer":["Verified",{"CustomerIdentity":{"Id":1,"PhoneNumber":"12345678"}}]
The text was updated successfully, but these errors were encountered:
Out of curiosity: is "comparer" element used in some scenarios? Looks like Thoth.Json.Giraffe/Thoth.Json.Net manage fine without it.
Sorry, something went wrong.
Hello @object sorry for the delay
This is bug in Thoth.Json (Fable version) which kind of "stringify" the whole instance of a map.
I suppose you DUs looks similar to Verifier of Map<.., ...>
Verifier of Map<.., ...>
If you look at the instance of your map in memory you will an object with comparer and tree property.
comparer
tree
As a workaround you can use manual decoder for now.
No branches or pull requests
I reproduced this using versions of Thoth.Json 4.0 and Thoth.Json.Net 4.1.
This is an example of a JSON generated using Decode.Auto from a Fable app (Thoth.Json):
"Customer":["Verified",{"comparer":{},"tree":["MapOne","CustomerIdentity",{"Id":1,"PhoneNumber":"12345678"}]}]
Thoth.Json.Net fails to decode this string because it doesn't expect comparer node. If I serialize the same data using Thoth.Json.Net, it works fine:
"Customer":["Verified",{"CustomerIdentity":{"Id":1,"PhoneNumber":"12345678"}}]
The text was updated successfully, but these errors were encountered: