You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
more specifically, I had to manually remove trailing commas from bun.lock to parse it into nix object.
Proposed solution
add builtin function builtins.fromJSONC
JSONC doesn't have "one universal standard", but it's generally assumed to be JSON superset with C-style comments (// and /* */) and trailing commas allowed (but not required)
Alternative solutions
add support for JSON5, which is superset of JSONC and has a universal standard https://json5.org/
use some package from nixpkgs to parse it (IFD)
manually remove comments and trailing commas from JSONC to then parse with builtins.fromJSON
Is your feature request related to a problem
nix can't natively parse JSONC.
more specifically, I had to manually remove trailing commas from
bun.lock
to parse it into nix object.Proposed solution
add builtin function
builtins.fromJSONC
JSONC doesn't have "one universal standard", but it's generally assumed to be JSON superset with C-style comments (
//
and/* */
) and trailing commas allowed (but not required)Alternative solutions
builtins.fromJSON
Additional context
Checklist
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: