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

Method encode

src/sentry/utils/json.py:70–74  ·  view source on GitHub ↗
(self, o: object)

Source from the content-addressed store, hash-verified

68 # Our variant of JSONEncoderForHTML that also accounts for apostrophes
69 # See: https://github.com/simplejson/simplejson/blob/master/simplejson/encoder.py
70 def encode(self, o: object) -> str:
71 # Override JSONEncoder.encode because it has hacks for
72 # performance that make things more complicated.
73 chunks = self.iterencode(o, True)
74 return "".join(chunks)
75
76 def iterencode(self, o: object, _one_shot: bool = False) -> Generator[str]:
77 chunks = super().iterencode(o, _one_shot)

Callers 2

dumpsFunction · 0.45
dumps_htmlsafeFunction · 0.45

Calls 2

iterencodeMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected