def METHOD_NAME(self, o: object) -> str:
    # Override JSONEncoder.encode because it has hacks for
    # performance that make things more complicated.
    chunks = self.iterencode(o, True)
    return "".join(chunks)