9 lines
272 B
Nix
9 lines
272 B
Nix
|
let
|
||
|
list = [ { name = "foo"; value = 123; }
|
||
|
{ name = "bar"; value = 456; } ];
|
||
|
string = ''{"x": [1, 2, 3], "y": null}'';
|
||
|
in
|
||
|
{
|
||
|
ex0 = builtins.listToAttrs list == { foo = 123; bar = 456; };
|
||
|
ex1 = builtins.fromJSON string == { x = [ 1 2 3 ]; y = null; };
|
||
|
}
|