16th August 2023
TIL
Processing a stream of chunks of JSON with ijson
— A follow-up to [Using OpenAI functions and their Python library for data extraction](https://til.simonwillison.net/gpt3/openai-python-functions-data-extraction) and [Using the ChatGPT streaming API from Python](https://til.simonwillison.net/gpt3/python-chatgpt-streaming-api). If I have a stream of chunks of a larger JSON document, how can I output full individual JSON objects as soon as they are available?
Recent articles
- Adding TILs, releases, museums, tools and research to my blog - 20th February 2026
- Two new Showboat tools: Chartroom and datasette-showboat - 17th February 2026
- Deep Blue - 15th February 2026