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
Currently the behavior for JSON serialization is inconsistent between the client and the server. Considering the following code:
WebSharper.Json.Deserialize<obj>("42")
On the server, it throws an exception; and on the client, it doesn't throw but returns a useless empty object, result of calling the obj constructor.
obj
There are two possibilities to have more consistent behavior:
Don't try to implement obj deserialization, and throw a compile-time error when this is called from the client-side.
Do implement obj deserialization, in which case we have to decide what the behavior should be.
float
int
obj[]
Dictionary<string, obj>
The text was updated successfully, but these errors were encountered:
[#921] Client-side JSON: handle System.Object as identity
1d14918
[#921] Server-side JSON: implement obj decoding
70e745c
[#921] Only deserialize obj, don't serialize, to avoid accidental upcast
898e7a7
No branches or pull requests
Currently the behavior for JSON serialization is inconsistent between the client and the server. Considering the following code:
On the server, it throws an exception; and on the client, it doesn't throw but returns a useless empty object, result of calling the
obj
constructor.There are two possibilities to have more consistent behavior:
Don't try to implement obj deserialization, and throw a compile-time error when this is called from the client-side.
Do implement obj deserialization, in which case we have to decide what the behavior should be.
float
, or should it returnint
if the value is an integer andfloat
otherwise?obj[]
?Dictionary<string, obj>
?The text was updated successfully, but these errors were encountered: