nix/tests/lang/eval-okay-tojson.nix
Robin Gloster 3130aafd01 builtins.toJSON: fix __toString usage
(cherry picked from commit e583df5280)
2020-01-04 14:10:56 +01:00

14 lines
260 B
Nix

builtins.toJSON
{ a = 123;
b = -456;
c = "foo";
d = "foo\n\"bar\"";
e = true;
f = false;
g = [ 1 2 3 ];
h = [ "a" [ "b" { "foo\nbar" = {}; } ] ];
i = 1 + 2;
j = 1.44;
k = { __toString = self: self.a; a = "foo"; };
}