The Json Nightmare #13667
lontivero
started this conversation in
Ideas for future
The Json Nightmare
#13667
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a common saying:
It is true but the problem is even worse: nobody knows how it works
Wasabi uses magic to serialize/deserialize json content, that means that it uses the server and client culture, it acts depending the media-type and who knows what else. Also, Wasabi uses different serialization libraries for different parts of the system, most use ǸewtonSoft.Json
while some parts use
System.Text.Json`. That means that there are JsonConverters based on NewtonSoft while others are based on System.Text and there are even a few duplicated JsonConverters. Finally, some json converters do magic things.Additionally Wasabi has different way to specify how to serialize objects: newer code uses well-configured serializers while older parts use decorations.
Finally, in most cases serializers use reflection to create instances and assign values to properties, something that is undesirable.
We should go for a explicit code for serialization instead of relaying on black magic.
Beta Was this translation helpful? Give feedback.
All reactions