'Form fields can customize what is considered as an empty value
for themselves (#19997).'

def test_custom_empty_values(self):

    class CustomJSONField(CharField, ):
        empty_values = [None, '']
        def to_python(self, value):
            if (value == '{}'):
                return {}
            return super().to_python(value)
    class JSONForm(forms.Form, ):
        json = CustomJSONField()
    form = JSONForm(data={'json': '{}'})
    form.full_clean()
    self.assertEqual(form.cleaned_data, {'json': {}})
