Closed oney closed 10 months ago
Thanks a lot for providing this! I will take a look
I see. Looks like I forgot \t
is a valid space char in JSON. I will make a new release solving this soon.
A minimal reproducible is:
> parse(`{"a"\t:""}`)
{}
> JSON.parse(`{"a"\t:""}`)
{ a: '' }
Fixed this in 0.1.4. Thank you again for trying this package and providing valuable bug.
That's fast 🤯 Thank you so much for the quick fix!
Working great, but index.d.ts file is missing https://www.npmjs.com/package/partial-json/v/0.1.4?activeTab=code
Sorry about that, I personally am not familiar with JavaScript packaging so I made a few mistake. I am working on it now
Fine. I've released v0.1.5 solving this. Thank you a lot for reporting this!
Thanks for making this package! It's very useful.
I encounter an issue. My LLM generates this weird but valid JSON string
Native
JSON.parse(str)
can parse it successfully withBut
import { parse } from "partial-json"; parse(str);
outputCould you help me?