Skip to content

Combinator encoding #272

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

Merged
merged 5 commits into from
May 30, 2025
Merged

Combinator encoding #272

merged 5 commits into from
May 30, 2025

Conversation

dfarr
Copy link
Member

@dfarr dfarr commented May 29, 2025

Implements combinator like encoders for encoding headers and data.

# default encoder
PairEncoder(HeaderEncoder("resonate:format-py", JsonPickleEncoder()), JsonEncoder())

# json only encoder
PairEncoder(NoopEncoder(), JsonEncoder())

# jsonpickle only encoder
PairEncoder(NoopEncoder(), JsonPickleEncoder())

The primitive encoders we provide could be used to implement more complex encoders to fit many use cases. For the time being only the data encoder (the right hand side of the PairEncoder) can be specified when instantiating resonate to keep configration simple.

@dfarr dfarr changed the title Cleanup default encoding strategy Combinator encoding May 29, 2025
@dfarr dfarr requested a review from avillega May 29, 2025 04:02
@dfarr dfarr merged commit cde4a7b into main May 30, 2025
8 checks passed
@dfarr dfarr deleted the cleanup-encoders branch May 30, 2025 20:13
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.

2 participants