      if isinstance(model_field, models.SlugField):
          kwargs['allow_unicode'] = model_field.allow_unicode
  
      if isinstance(model_field, models.TextField) and not model_field.choices or \
              (postgres_fields and isinstance(model_field, postgres_fields.JSONField)):
          kwargs['style'] = {'base_template': 'textarea.html'}
  
      if isinstance(model_field, models.AutoField) or not model_field.editable:
          # If this field is read-only, then return early.
          # Further keyword arguments are not valid.
 
</s> remove         if postgres_fields and isinstance(model_field, postgres_fields.JSONField):
 </s> add         is_django_jsonfield = hasattr(models, 'JSONField') and isinstance(model_field, models.JSONField)
        if (postgres_fields and isinstance(model_field, postgres_fields.JSONField)) or is_django_jsonfield: </s> remove                 return json.loads(data)
 </s> add                 return json.loads(data, cls=self.decoder) </s> remove             # for the PostgreSQL specific `JSONField`.
 </s> add             # for the model `JSONField`.
            (postgres_fields and isinstance(model_field, postgres_fields.JSONField)) or \
            (hasattr(models, 'JSONField') and isinstance(model_field, models.JSONField)):
      if isinstance(model_field, models.SlugField):
          kwargs['allow_unicode'] = model_field.allow_unicode
  
      if isinstance(model_field, models.TextField) and not model_field.choices or \
            (postgres_fields and isinstance(model_field, postgres_fields.JSONField)) or \
            (hasattr(models, 'JSONField') and isinstance(model_field, models.JSONField)):
          kwargs['style'] = {'base_template': 'textarea.html'}
  
      if isinstance(model_field, models.AutoField) or not model_field.editable:
          # If this field is read-only, then return early.
          # Further keyword arguments are not valid.
keep keep keep keep replace keep keep keep keep keep
 Add support for Django 3.1 JSONField (#7467)

Django 3.1 adds a new generic JSONField to replace the PostgreSQL-specific one. This adds support for the new field type, which should behave the same as the existing PostgreSQL field.

Django's new JSONField also includes support for a custom "decoder", so add support for that in the serializer field. 
rest_framework/utils/field_mapping.py