unjs / destr

🚀 Faster, secure and convenient alternative for JSON.parse
MIT License
1.03k stars 14 forks source link

better Readme #72

Closed c0ncentus closed 11 months ago

c0ncentus commented 1 year ago

Describe the feature

"A faster, secure and convenient alternative for JSON.parse.".

It will be interesting versus other JsonParser ... I dont want to search all tool (maybe twenty) who suggests the same thing (and the latest lol) ...

I have no interest by this package because already 20 or more package do the "same" things and i dont know wich is the best :o .... and why this package is so special ?

Additional information

pi0 commented 1 year ago

Hi. You can yourself check the benchmarks and also feature parity for comparative. I guess non of them (at least by the time of making this package focuses on supporting edge case handling in addition to security and performance part nor supported ESM build. If you found something to improve docs, PR is more than welcome 👍🏼

NesCafe62 commented 12 months ago

When I saw "faster" than JSON.parse in repo description I expected to see in sources string parsing implementation (that should beat default JSON.parse)... but when I opened it I saw JSON.parse in it :D Then I thought how it can be faster than if it does JSON.parse + additional logic. I think it is a bit not clear. Most likely "faster" means for cases when data is from a set of short known dictionary values

pi0 commented 12 months ago

Yes, we kinda mentioned this in each section with numbers also here:

In the other words, destr is better when input is not always a json string or from untrusted source like request body.

Still feel free to make a PR to improve working from readme :)

pi0 commented 11 months ago

Closing for maintenance (pr always welcome!)