class CustomJSONEncoder(JSONEncoder):

    def iterencode(self, o, _one_shot=False):
        """Encode the given object and yield each string
        representation as available.
        For example::
            for chunk in JSONEncoder().iterencode(bigobject):
                mysocket.write(chunk)
        """
c_make_encoder = None
if self.check_circular:
    markers = {}
else:
    pass
Исправление обезьяны данных Django Rest Framework Json