Skip to content
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

Add custom serde support #27

Merged
merged 15 commits into from
Oct 22, 2022
Merged

Add custom serde support #27

merged 15 commits into from
Oct 22, 2022

Conversation

hypergonial
Copy link
Member

@hypergonial hypergonial commented Oct 22, 2022

Add support for custom serializers, as users (such as myself) may have previously used different formats to serialize & deserialize their custom_id and may want their components to continue working with flare.

This PR also adds a version char as the first character of the custom_id, so different serializers can be prevented from deserializing a different format they may not be expected to handle. Note that using serde versioning is optional and if a custom serializer is created with the version character set to None, then version checking will be disabled.

Note: I haven't tested if any of this works.

@hypergonial hypergonial self-assigned this Oct 22, 2022
@hypergonial hypergonial added the enhancement New feature or request label Oct 22, 2022
flare/internal/event_handler.py Show resolved Hide resolved
flare/internal/serde.py Outdated Show resolved Hide resolved
flare/internal/serde.py Outdated Show resolved Hide resolved
flare/internal/serde.py Outdated Show resolved Hide resolved
Co-authored-by: Lunarmagpie <Bambolambo0@gmail.com>
@hypergonial hypergonial enabled auto-merge (squash) October 22, 2022 20:23
@hypergonial hypergonial merged commit fddc094 into main Oct 22, 2022
@zunda-arrow zunda-arrow deleted the feat/custom-serde branch October 22, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants