Skip to content

TASK: Implement Person serialization to a dictionary #141

Description

@TheGittyPerson

Leave a comment if you want to work on this task!

Difficulty: Upper Intermediate to Advanced

TODO:

  • Add a method to convert a Person into a dict, with all the instance variables stored inside it. Call the method whatever you want (e.g., serialize(), to_dict(), dictify())
  • Bonus: Add a classmethod to deserialize a dictionary into a Person object.
    • The name of the method should make it clear that the method is the opposite of the one above (deserialize(), from_dict(), undictify())
    • Handling edge cases is important here
  • Another bonus: Add serialization/deserialization methods in the other classes too, so that the final serialization in of a Person is pure built-in types. This might take some time.
  • Remember to add type hints and docstrings where necessary and follow PEP 8

PR steps:

  1. Fork this repo
  2. Clone the forked repo
  3. Create a new branch and name it feat/person-dict-serialization
  4. Push commits to your remote fork
  5. Create a PR titled TASK: Implement `Person` serialization to a dictionary (#141)
  6. At the end of the PR description, add Closes #141
  7. Submit the PR (Ensure you allow maintainers to edit)

Please make sure you have read the Contributing Guidelines before working.


Feel free to ask any questions here!

If you are interested in working on this task,
please leave a comment requesting assignment to explicitly let others know the task is taken and prevent duplicate PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or enhancementgood first issueGood for newcomershelp wantedExtra attention is neededtaskThis is a task issue / PR completing a task🐝 Lower AdvancedGood for devs with many years of experience and confidence in programming🦗 Upper IntermediateGood for growing devs with good confidence and experience in programming🪲 AdvancedGood for devs with many years of experience and potentially some formal education

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions