fix(controller): don't encode empty JSON objects or arrays as strings

The django-json-field 0.5.5 package has a bug encoding empty JSON objects.
Instead use a subclass which fixes this as a special case.

Includes unit and integration tests.