aboutsummaryrefslogtreecommitdiffstats
path: root/test/testdata/eval-okay-fromjson.nix
diff options
context:
space:
mode:
Diffstat (limited to 'test/testdata/eval-okay-fromjson.nix')
-rw-r--r--test/testdata/eval-okay-fromjson.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/testdata/eval-okay-fromjson.nix b/test/testdata/eval-okay-fromjson.nix
new file mode 100644
index 0000000..4c526b9
--- /dev/null
+++ b/test/testdata/eval-okay-fromjson.nix
@@ -0,0 +1,41 @@
1builtins.fromJSON
2 ''
3 {
4 "Video": {
5 "Title": "The Penguin Chronicles",
6 "Width": 1920,
7 "Height": 1080,
8 "EmbeddedData": [3.14159, 23493,null, true ,false, -10],
9 "Thumb": {
10 "Url": "http://www.example.com/video/5678931",
11 "Width": 200,
12 "Height": 250
13 },
14 "Animated" : false,
15 "IDs": [116, 943, 234, 38793, true ,false,null, -100],
16 "Escapes": "\"\\\/\t\n\r\t",
17 "Subtitle" : false,
18 "Latitude": 37.7668,
19 "Longitude": -122.3959
20 }
21 }
22 ''
23==
24 { Video =
25 { Title = "The Penguin Chronicles";
26 Width = 1920;
27 Height = 1080;
28 EmbeddedData = [ 3.14159 23493 null true false (0-10) ];
29 Thumb =
30 { Url = "http://www.example.com/video/5678931";
31 Width = 200;
32 Height = 250;
33 };
34 Animated = false;
35 IDs = [ 116 943 234 38793 true false null (0-100) ];
36 Escapes = "\"\\\/\t\n\r\t"; # supported in JSON but not Nix: \b\f
37 Subtitle = false;
38 Latitude = 37.7668;
39 Longitude = -122.3959;
40 };
41 }