mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 21:46:01 +01:00
Convert Realisation JSON logic to standard style
No behavior is changed, just: - Declare a canonical `nlohmnan::json::adl_serializer` - Use `json-utils.hh` to shorten code without getting worse error messages. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
6389f65d63
commit
91593a237f
7 changed files with 73 additions and 61 deletions
|
|
@ -168,7 +168,7 @@ StoreWrapper::queryRawRealisation(char * outputId)
|
|||
try {
|
||||
auto realisation = THIS->store->queryRealisation(DrvOutput::parse(outputId));
|
||||
if (realisation)
|
||||
XPUSHs(sv_2mortal(newSVpv(realisation->toJSON().dump().c_str(), 0)));
|
||||
XPUSHs(sv_2mortal(newSVpv(static_cast<nlohmann::json>(*realisation).dump().c_str(), 0)));
|
||||
else
|
||||
XPUSHs(sv_2mortal(newSVpv("", 0)));
|
||||
} catch (Error & e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue