          return data
  
      def to_representation(self, value):
          if self.binary:
              return json.dumps(value)
          return value
  
  
  # Miscellaneous field types...
  
 
</s> remove         }, '{"a": 1, "3": null, "b": ["some", "list", true, 1.23]}'),
 </s> add         }, b'{"a": 1, "3": null, "b": ["some", "list", true, 1.23]}'), </s> remove         ('{"a": 1, "3": null, "b": ["some", "list", true, 1.23]}', {
 </s> add         (b'{"a": 1, "3": null, "b": ["some", "list", true, 1.23]}', {
            value = json.dumps(value)
            # On python 2.x the return type for json.dumps() is underspecified.
            # On python 3.x json.dumps() returns unicode strings.
            if isinstance(value, six.text_type):
                value = bytes(value.encode('utf-8'))
          return data
  
      def to_representation(self, value):
          if self.binary:
            value = json.dumps(value)
            # On python 2.x the return type for json.dumps() is underspecified.
            # On python 3.x json.dumps() returns unicode strings.
            if isinstance(value, six.text_type):
                value = bytes(value.encode('utf-8'))
          return value
  
  
  # Miscellaneous field types...
  
keep keep keep keep replace keep keep keep keep keep
 Work around 2.x/3.x json.dumps() return type fuzziness 
rest_framework/fields.py