(self, o: object, _one_shot: bool = False)
| 74 | return "".join(chunks) |
| 75 | |
| 76 | def iterencode(self, o: object, _one_shot: bool = False) -> Generator[str]: |
| 77 | chunks = super().iterencode(o, _one_shot) |
| 78 | for chunk in chunks: |
| 79 | chunk = chunk.replace("&", "\\u0026") |
| 80 | chunk = chunk.replace("<", "\\u003c") |
| 81 | chunk = chunk.replace(">", "\\u003e") |
| 82 | chunk = chunk.replace("'", "\\u0027") |
| 83 | yield chunk |
| 84 | |
| 85 | |
| 86 | _default_encoder = JSONEncoder( |