-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Support registering serializers / deserializers for Dexterity Schemas #1832
Comments
@ericof Could you explain the use case please? |
@ericof I'm not convinced yet.
I'm not that worried about the duplication, because we should be able to remove it once we drop support for Plone 5
This is already supported by configuring a read_permission for the field, isn't it? I also don't want to add a new extension mechanism for serialization without also thinking about how it interacts with deserialization. In general when editing the serialized content goes in the redux store in Volto, gets updated, then sent back to the server. So if it's serialized in some unusual format, there needs to be a way to handle it during deserialization as well. |
Good point.
No, read_permission is all or nothing, if you don't have it, it won't be serialized. What I need is something "gray". Also, if I want to add additional information to a behavior serialization, but I don't want to touch the Field serializer, this is useful. A third use case , that ties to your point bellow, is to write serializers (and deserializers) to group information under a key. For instance, I want all data for my behavior (contact.address) to be grouped under the same key. And then, during the deserialization be exposed again as their own attributes.
Already implementing this support. |
Problems to be solved
Example implementation
New Serializer Interface
Register serializers against a new interface
Register new serializers against this interface
Function to serialize all schemata
Refactor dxcontent.py and site.py to use new helper function
The text was updated successfully, but these errors were encountered: