def get_json_body(self):
        if not self.request.body:
            return None
        body = self.request.body.strip().decode('utf-8')
        try:
            model = json.loads(body)
        except Exception:
            self.log.debug("Bad JSON: %r", body)
            self.log.error("Couldn't parse JSON", exc_info=True)
            raise web.HTTPError(400, 'Invalid JSON in body of request')
        return model
Test that JSON fields are frozen as I expect.
dataset/ETHPy150Open jupyterhub/jupyterhub/jupyterhub/apihandlers/base.py/APIHandler.get_json_body--crossover with--dataset/ETHPy150Open lukesneeringer/django-pgfields/tests/south_migrations/tests.py/MigrationCreationSuite.test_json_freeze