Previously the fields if they null they did not return through the API and my deserealizer worked correctly.
Today I noticed that the fields started to return from NULL. I’m a deserealizer can’t work with NULL when Boolean or Datetime. How it possible
I use Azure version.
If you host Squidex yourself you probably use a
latest tag, which is in general not a good idea.
The behavior has been changed with the recent update because of this issue: How to unset a field with a PATCH request?
Basically the API was clearing null values before saving them. This was causing issues, because it was not possible to change a string or boolean from a value to null and null is a total valid value in many cases.
If you have issues you have to do 2 things:
- Make your deserializer work, e.g. by using ´bool?` in C# or with a custom converter.
- Set the field to required.
Thanks for the answer!
I specified the version. This should protect me from updates.
I will change the fields to required. But for me it was a surprise.
The behavior does not just change, you must have done an update in some way or another.