nuxdie/json-like-parse
JavaScript npm module that finds JSON-like text within a string and then parses it on best effort basis
When working with AI and Large Language Models (LLMs), you often ask them for structured information, like JSON. This tool helps JavaScript developers take the AI's response, which might be a mix of text and malformed JSON, and extract the structured data. It takes a string of text from an AI and attempts to give you back valid JavaScript objects.
No commits in the last 6 months. Available on npm.
Use this if you are a JavaScript developer trying to reliably extract structured data from AI-generated text, even when the AI's output isn't perfectly formatted JSON.
Not ideal if you are working with strictly valid JSON data, as a standard JSON parser will be more robust and accurate.
Stars
22
Forks
1
Language
JavaScript
License
MIT
Category
Last pushed
Mar 21, 2023
Commits (30d)
0
Dependencies
1
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/nuxdie/json-like-parse"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
mangiucugna/json_repair
A python module to repair invalid JSON from LLMs
antfu/shiki-stream
Streaming highlighting with Shiki. Useful for highlighting text streams like LLM outputs.
yokingma/fetch-sse
An easy API for making Event Source requests, with all the features of fetch(), Supports...
iw4p/partialjson
+1M Downloads! Repair invalid LLM JSON, commonly used to parse the output of LLMs — Parsing...
kaptinlin/jsonrepair
A high-performance Golang library for easily repairing invalid JSON documents. Designed to fix...