You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes this is intended. JSON_API_FORMAT_KEYS actually got deprecated in version 2.5.0 which had this behavior and got removed in the new major release 3.0.0. Only option JSON_API_FORMAT_FIELD_NAMES now exists which only formats the field names.
For better understanding:
In the json api specification there are no nested fields/keys, but only an attribute field name and its value. And a value if desired can be any valid json.
So before when DJA formatted all nested keys it actually adjusted the value. This led to invalid data see #313 and #420 for more details - basically this was a bug and not intended by the specification.
So hence JSON_API_FORMAT_FIELD_NAMES only formats the field names but not the keys of a value. If you still want to format the nested keys in a JSONField or DictField you would need to adjust your serializer.
@sliverc The description in #313 makes totally sense. I will adjust my serializer for the permissions dict to have dasherized keys. Thanks for your reply.
I use the settings
With DJA 2.8.0 all keys are converted according to the settings.
With DJA 3.0.0 this does not happen any more (not for nested keys?). Is that intended?
The text was updated successfully, but these errors were encountered: