Skip to content

Pass a context in depth of serialize calls (API changed)#41

Open
Harut wants to merge 2 commits into
clarkduvall:masterfrom
Harut:context
Open

Pass a context in depth of serialize calls (API changed)#41
Harut wants to merge 2 commits into
clarkduvall:masterfrom
Harut:context

Conversation

@Harut

@Harut Harut commented Mar 10, 2017

Copy link
Copy Markdown

Currently serpy fields are both stateless and context-less, i.e. you can not access anything except the current value from inside of a serializers. While statelesness makes serpy fast and clear, there is no real reason not to pass context to lower levels of data serializers.

Most obvious use case: serialize URLs as absolute depending on a request.

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

Successfully merging this pull request may close these issues.

1 participant