Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
builtins.fromJSON: use nlohmann/json parser instead of custom parser #3307
Nix already links to nlohmann/json, so we might just as well use it for JSON parsing, instead of a custom parser that is accumulating complexity.
This uses the sax backend to avoid accumulating a lot of data in memory before conversion to nix. I am not sure about the use of new/delete in combination with things that might end up GC'd, but I suspect this is fine because they are all gone before a GC ever happens.