-
Notifications
You must be signed in to change notification settings - Fork 182
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
Feature/custom object json serializer #93
base: master
Are you sure you want to change the base?
Feature/custom object json serializer #93
Conversation
Some of my models that I would like to audit contain sensitive information that'd prefer not be saved. Ideally, I would have the option of fields to ignore on a per model basis when performing json serialization. I think that this could be accomplished with something as simple as a callback that post serialization that would allow for modifying the json. Additionally, for changes to sensitive fields, it would be nice to see that a change to that field was made without showing the info itself. |
Below is an example usage. Create the following methods:
And add the following to settings:
|
@jdkizer9 hi. Sounds like a good use case. I do wonder though if for instance the serializer had an exception should it fall back to the default? At scale you may want that ability (and normalize the data after the fix has been issued on the client code). |
@jdkizer9 can you resolve the conflict and check on the comment I made? |
b8de43c
to
c9e01f9
Compare
@jheld Ok, yeah, that makes sense. Before I fix, I feel like we might also want to override serialization in |
@jdkizer9 Your question re: Minor (but important overall), I think we'll need to support callables and as well as string module paths to the new settings. In which case, I think we can add that resolver "statically" probably in |
Good morning, at the end, this functionality is implemented? I don't know how to hide some fileds from my models, for example, password filed (it is encrypted but I don't want to show this field). Thanks! |
Fixes issue #92