clic.stream_json: Wrapper to stream JSON arrays to client¶
-
class
clic.stream_json.JSONEncoder(*args, **kwargs)¶ Bases:
sphinx.ext.autodoc.importer._MockObject-
default(obj)¶
-
-
clic.stream_json.format_error(e)¶
-
clic.stream_json.stream_json(generator, header={}, cls=<class 'json.encoder.JSONEncoder'>)¶ Stream output of generator as JSON. Generator results should be of the form:
- (‘footer’, {x}): Include items in x after main results
- (‘header’, {x}): Include items in x before main results
- Anything else: Add to a “data” array