mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +02:00
Add a toJSON primop
This commit is contained in:
parent
285df765b9
commit
77c13cdf56
10 changed files with 179 additions and 24 deletions
11
tests/lang/eval-okay-tojson.nix
Normal file
11
tests/lang/eval-okay-tojson.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue