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

feat: format specific (de)serialize #25

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

jkowalleck
Copy link
Collaborator

@jkowalleck jkowalleck commented Sep 29, 2023

Added functionality to implement custom (de)serialization specific for XML or JSON.

Changed:

  • Class BaseHelper is no longer abstract.
    This class does not provide any functionality, it is more like a Protocol with some fallback implementations.
  • Method BaseHelper.serialize() is no longer abstract.
    Will raise NotImplementedError per default.
  • Method BaseHelper.deserialize() is no longer abstract.
    Will raise NotImplementedError per default.

Added

  • New method BaseHelper.json_serialize() predefined.
    Will call cls.serialize() per default.
  • New method BaseHelper.json_deserialize() predefined.
    Will call cls.deserialize() per default.

fixes #13

@jkowalleck jkowalleck added the enhancement New feature or request label Sep 29, 2023
@jkowalleck jkowalleck requested a review from madpah as a code owner September 29, 2023 15:16
@jkowalleck jkowalleck merged commit dc998df into main Oct 1, 2023
19 checks passed
@jkowalleck jkowalleck deleted the feat/custom-specific-serialize branch October 1, 2023 09:42
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.

feat: allow different/custom (de)serialization on JSON/XML
1 participant