skorokithakis/django-annoying

Remove pretty-print from the JSON field output or make it configurable

Closed this issue · 2 comments

Pretty-print adds huge space overhead to the output. This feature doesn't give any options in case when we want to inherit the class for encryption except using v0.8.7 which is the latest one without pretty-print.

That's a good idea, ideally you could pass a function to the field to be called on the JSON string before saving. Something like JSONField(transform_func=pprint.pprint). Would you be interested in issuing a PR?

Thank you!