ID EN
JSON

iterencode

Python 3.11

Encode the given object, o, and yield each string representation as available. For example:

Syntax

PYTHON
iterencode(o)

Examples

Example 1
PYTHON
for chunk in json.JSONEncoder().iterencode(bigobject):
    mysocket.write(chunk)