about summary refs log tree commit diff
path: root/tvix/eval/src/tests/nix_tests/eval-okay-fromjson.nix
blob: e1c0f86cc4e474507556e02d719eb9537792ff44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
builtins.fromJSON
  ''
    {
      "Video": {
          "Title":  "The Penguin Chronicles",
          "Width":  1920,
          "Height": 1080,
          "EmbeddedData": [3.14159, 23493,null, true  ,false, -10],
          "Thumb": {
              "Url":    "http://www.example.com/video/5678931",
              "Width":  200,
              "Height": 250
          },
          "Subtitle" : false,
          "Latitude":  46.2051,
          "Longitude": 6.0723
        }
    }
  ''
==
  { Video =
    { Title = "The Penguin Chronicles";
      Width = 1920;
      Height = 1080;
      EmbeddedData = [ 3.14159 23493 null true false (0-10) ];
      Thumb =
        { Url = "http://www.example.com/video/5678931";
          Width = 200;
          Height = 250;
        };
      Subtitle = false;
      Latitude = 46.2051;
      Longitude = 6.0723;
    };
  }