MCPcopy Index your code
hub / github.com/getsentry/sentry / iterencode

Method iterencode

src/sentry/utils/json.py:76–83  ·  view source on GitHub ↗
(self, o: object, _one_shot: bool = False)

Source from the content-addressed store, hash-verified

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(

Callers 2

encodeMethod · 0.95
dumpFunction · 0.80

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected