aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/json-to-value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/json-to-value.cc')
-rw-r--r--src/libexpr/json-to-value.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/json-to-value.cc b/src/libexpr/json-to-value.cc
index 4dc41729a..88716250c 100644
--- a/src/libexpr/json-to-value.cc
+++ b/src/libexpr/json-to-value.cc
@@ -37,10 +37,10 @@ class JSONSax : nlohmann::json_sax<json> {
ValueMap attrs;
std::unique_ptr<JSONState> resolve(EvalState & state) override
{
- Value & v = parent->value(state);
- state.mkAttrs(v, attrs.size());
+ auto attrs2 = state.buildBindings(attrs.size());
for (auto & i : attrs)
- v.attrs->push_back(Attr(i.first, i.second));
+ attrs2.insert(i.first, i.second);
+ parent->value(state).mkAttrs(attrs2.alreadySorted());
return std::move(parent);
}
void add() override { v = nullptr; }