Amertz08 / drf_ujson2

JSON parser and renderer using ujson for Django Rest Framework
MIT License
36 stars 4 forks source link

Provide default fallback for objects that aren't serializable #21

Closed patrickdamery closed 1 year ago

patrickdamery commented 1 year ago

Use DRF JSONEncoder to provide a fallback default for objects that aren't serializable. This matches the default functionality of DRF JSONRenderer.

patrickdamery commented 1 year ago

Updated to make use of JSONRenderer's encoder_class instead to allow for further customization if requireds

Amertz08 commented 1 year ago

I'll give this a look this weekend or early next week.

patrickdamery commented 1 year ago

Any chance you've had time to review this yet? @Amertz08

Amertz08 commented 1 year ago

Uploaded to PyPI 1.7.0