MCPcopy Index your code
hub / github.com/simplejson/simplejson / iterencode

Method iterencode

simplejson/encoder.py:422–433  ·  view source on GitHub ↗
(self, o)

Source from the content-addressed store, hash-verified

420 return u''.join(chunks)
421
422 def iterencode(self, o):
423 chunks = super(JSONEncoderForHTML, self).iterencode(o)
424 for chunk in chunks:
425 chunk = chunk.replace('&', '\\u0026')
426 chunk = chunk.replace('<', '\\u003c')
427 chunk = chunk.replace('>', '\\u003e')
428
429 if not self.ensure_ascii:
430 chunk = chunk.replace(u'\u2028', '\\u2028')
431 chunk = chunk.replace(u'\u2029', '\\u2029')
432
433 yield chunk
434
435
436def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,

Callers 1

encodeMethod · 0.95

Calls 1

iterencodeMethod · 0.45

Tested by

no test coverage detected