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

ability to add your own custom handlers #14

Open
Almenon opened this issue Feb 19, 2018 · 0 comments
Open

ability to add your own custom handlers #14

Almenon opened this issue Feb 19, 2018 · 0 comments

Comments

@Almenon
Copy link
Owner

Almenon commented Feb 19, 2018

in https://github.com/Almenon/AREPL-backend/blob/master/python/customHandlers.py I have handlers for some objects like datetime and regex. When JSONpickle encodes these objects it uses the custom handlers. The end result is a different set of properties display, so you can provide a more human-friendly representation of the object.

The downside to this is that there are literally infinite possible variations of objects, and I can only cover the most common ones. Dynamically importing a python file of the user's choice would allow them to add custom handlers for objects of their choosing.

The alternative is that they have to submit a pull request to this repo. It's a lot easier on my end to merge a pull request than do all that dev work so until (if) arepl becomes popular this is going straight to the trashbin. I mean, the backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant