Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

README: a git-diff style example of how a group of serializers compares to serialization_spec #5

Open
jordaneb opened this issue Oct 15, 2019 · 1 comment
Labels
README Improvements or additions to documentation

Comments

@jordaneb
Copy link
Member

jordaneb commented Oct 15, 2019

i reckon this would be really good for illustrating to people how to get their heads around how it works in comparison

e.g.

- class MySerializer(serializers.Serializer):
-     field = CharField()
-     other = SerializerMethodField()     
-
-     def get_other(self):
-         # something that can be replaced with a plugin
+ serialization_spec = [
+     'field',
+     {'other': OtherPlugin},
+ ]
@pmg103
Copy link
Contributor

pmg103 commented Oct 16, 2019

I see what you mean but SSM is so much simpler than hand-rolled serializer/view I feel like its sad to have to make reference to that more complicated thing to explain a simpler thing.

Maybe a supplementary migration guide would be useful though

@pmg103 pmg103 added the README Improvements or additions to documentation label Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
README Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants