                  r = r[:12]
              return r
          elif isinstance(o, datetime.timedelta):
              return duration_iso_string(o)
          elif isinstance(o, decimal.Decimal):
              return str(o)
          elif isinstance(o, uuid.UUID):
              return str(o)
          elif isinstance(o, Promise):
              return six.text_type(o)
 
</s> remove         elif isinstance(o, uuid.UUID):
            return str(o)
        elif isinstance(o, Promise):
            return six.text_type(o)
 </s> add  </s> remove     elif isinstance(value, six.integer_types + (decimal.Decimal, float)):
 </s> add     elif isinstance(value, (int, decimal.Decimal, float)): </s> remove         return six.text_type(value)
    elif isinstance(value, (decimal.Decimal, float) + six.integer_types):
 </s> add         return str(value)
    elif isinstance(value, (decimal.Decimal, float, int)): </s> remove         elif isinstance(value, six.string_types):
            return "'%s'" % six.text_type(value).replace("\'", "\'\'")
        elif isinstance(value, six.buffer_types):
 </s> add         elif isinstance(value, str):
            return "'%s'" % value.replace("\'", "\'\'")
        elif isinstance(value, (bytes, bytearray, memoryview)): </s> remove         return mark_safe(six.text_type(value))
    elif isinstance(value, (decimal.Decimal, float) + six.integer_types):
 </s> add         return mark_safe(str(value))
    elif isinstance(value, (decimal.Decimal, float, int)):
        elif isinstance(o, (decimal.Decimal, uuid.UUID, Promise)):
                  r = r[:12]
              return r
          elif isinstance(o, datetime.timedelta):
              return duration_iso_string(o)
        elif isinstance(o, (decimal.Decimal, uuid.UUID, Promise)):
              return str(o)
          elif isinstance(o, uuid.UUID):
              return str(o)
          elif isinstance(o, Promise):
              return six.text_type(o)
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
django/core/serializers/json.py