
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
import streamingjson
Welcome to streaming-json-py, a groundbreaking library designed to revolutionize the way we handle stream JSON parsing.
In an era dominated by LLMs (Large Language Models), the ability to efficiently parse JSON streams is more critical than ever. Traditionally, JSON parsing libraries have fallen short, requiring JSON data to be fully generated before any parsing can begin. streaming-json-py challenges this limitation head-on.
Basically, this library is used to complete fragmented JSON, making it into syntactically correct JSON. For example:
{"a":
will complete to {"a":null}
and When the JSON stream continues to output as:
{"a":[tr
will complete to {"a":[true]}
Do not worry about the JSON stream stopping anywhere, such as at a comma:
{"a":[true],
will complete to {"a":[true]}
Escaped characters? No problem:
{"a":[true], "b": "this is unicode \u54"
will complete to {"a":[true], "b": "this is unicode "}
(After the stream outputs the complete Unicode, it will then display.)
Here’s a quick example to get you started:
install from pypi:
pip install streamingjson
run example:
# init, @NOTE: We need to assign a new lexer for each JSON stream.
lexer = streamingjson.Lexer()
# append your JSON segment
lexer.append_string('{"a":')
# complete the JSON
print(lexer.complete_json()) # will print `{"a":null}`
# append more JSON segment
lexer.append_string('[tr')
# complete the JSON again
print(lexer.complete_json()) # will print `{"a":[true]}`
For more examples please see: examples
Please see:
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A streamlined, user-friendly JSON streaming preprocessor, crafted in Python.
We found that streamingjson demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.