mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
parent
e82951fe23
commit
beaf3e90af
6 changed files with 217 additions and 0 deletions
1
tests/lang/eval-okay-fromjson.exp
Normal file
1
tests/lang/eval-okay-fromjson.exp
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
32
tests/lang/eval-okay-fromjson.nix
Normal file
32
tests/lang/eval-okay-fromjson.nix
Normal 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) ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue