          ]
          for error in control:
              self.assertInHTML(error, errors)
  
          errors = json.loads(form.errors.as_json())
          control = {
              'foo': [{'code': 'required', 'message': 'This field is required.'}],
              'bar': [{'code': 'required', 'message': 'This field is required.'}],
              '__all__': [{'code': 'secret', 'message': 'Non-field error.'}]
          }
 
</s>
        errors = form.errors.get_json_data()
          ]
          for error in control:
              self.assertInHTML(error, errors)
  
        errors = form.errors.get_json_data()
          control = {
              'foo': [{'code': 'required', 'message': 'This field is required.'}],
              'bar': [{'code': 'required', 'message': 'This field is required.'}],
              '__all__': [{'code': 'secret', 'message': 'Non-field error.'}]
          }
keep keep keep keep replace keep keep keep keep keep
 Fixed #27922 -- Added ErrorDict.get_json_data().
tests/forms_tests/tests/test_forms.py