golden-fleece
golden-fleece copied to clipboard
Add option to force quoted keys.
I know golden-fleece works on JSON5 but I'm finding it handy to edit package.json files (nothing fancy). However, since it's plain old JSON the keys generated need to be double quoted. In cases of creating new keys golden-fleece currently leaves them unquoted unless needed-to for valid syntax.
Would it be enough if it used the existing conventions? i.e. if the majority of existing keys used double quotes, use double quotes for new keys; if the majority of existing keys that don't require quotes aren't quoted, only use quotes for keys that do require it.
Or could there be a situation where there are no initial keys on which to base that judgment?
In my case there are existing keys, however a general option couldn't hurt either for cases where the start is an empty JSON object {}
.
I just used golden-fleece
today and ran into this again 🙃
It's been just a bit (burnout is real) is golden-fleece
still THE jam for this kind of thing or has something else emerged?
For dealing with just JSON (not JSON5), I forked this repo and called it silver-fleece. It will always use double-quote keys :)