def get_db_prep_save(self, value, connection):
    'Convert our JSON object to a string before we save'
    if (not isinstance(value, (list, dict))):
        return super(JSONField, self).get_db_prep_save('', connection=connection)
    else:
        return super(JSONField, self).get_db_prep_save(dumps(value), connection=connection)
Convert our JSON object to a string before we save
def get_db_prep_save(self, value, connection):
    
    if (not isinstance(value, (list, dict))):
        return super(JSONField, self).get_db_prep_save(, connection=connection)
    else:
        return super(JSONField, self).get_db_prep_save(dumps(value), connection=connection)