1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 18:31:49 +02:00

Add builtin function ‘fromJSON’

Fixes #294.
This commit is contained in:
Eelco Dolstra 2014-07-04 13:34:15 +02:00
parent e82951fe23
commit beaf3e90af
6 changed files with 217 additions and 0 deletions

View file

@ -0,0 +1 @@
true

View file

@ -0,0 +1,32 @@
# RFC 7159, section 13.
builtins.fromJSON
''
{
"Image": {
"Width": 800,
"Height": 600,
"Title": "View from 15th Floor",
"Thumbnail": {
"Url": "http://www.example.com/image/481989943",
"Height": 125,
"Width": 100
},
"Animated" : false,
"IDs": [116, 943, 234, 38793, true ,false,null, -100]
}
}
''
==
{ Image =
{ Width = 800;
Height = 600;
Title = "View from 15th Floor";
Thumbnail =
{ Url = http://www.example.com/image/481989943;
Height = 125;
Width = 100;
};
Animated = false;
IDs = [ 116 943 234 38793 true false null (0-100) ];
};
}