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

Custom deserialization of null values #175

Open
achimmihca opened this issue May 3, 2023 · 0 comments
Open

Custom deserialization of null values #175

achimmihca opened this issue May 3, 2023 · 0 comments

Comments

@achimmihca
Copy link

I found that null values do not call custom deserializations. Instead, the value is just set to null.

This prevents custom deserialization of null values. For example, one cannot replace null with an empty string or empty list.

My use case is that I have JSON settings wrapped in observable properties, namely in an UniRx.ReactiveProperty.
Now, I'd like to deserialize a null value by settings the ReactiveProperty's value to null.
But what happens instead is that the ReactiveProperty itself is set to null, which leads to null pointer exceptions and subsribers not being notified.

Is there a way to handle null values in custom deserialization?

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

No branches or pull requests

1 participant