| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 |
|
| 4 |
<head> |
| 5 |
<title>Jsonnet - {{ page.title }}</title> |
| 6 |
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> |
| 7 |
<meta name="keywords" content="Jsonnet, JSON, YAML, language, configuration, configuration language, functional, declarative, lazy, structured, elegant, semantics, clean, mixins, inheritance, template, expansion, expand" /> |
| 8 |
<meta name="description" content="A powerful DSL for elegant description of JSON data." /> |
| 9 |
<meta name="viewport" content="width={{ layout.viewport_width }}"> |
| 10 |
|
| 11 |
<link rel="icon" type="image/png" href="/favicon.png" /> |
| 12 |
|
| 13 |
<!-- MathJax (for semantics) --> |
| 14 |
<script type="text/x-mathjax-config"> |
| 15 |
MathJax.Hub.Config({ |
| 16 |
extensions: ["tex2jax.js"], |
| 17 |
jax: ["input/TeX","output/HTML-CSS"], |
| 18 |
displayAlign: "left", |
| 19 |
imageFont: null, |
| 20 |
}); |
| 21 |
</script> |
| 22 |
<script type="text/javascript" src="/third_party/MathJax-2.7.2/MathJax.js"></script> |
| 23 |
<script type="text/javascript" src="/third_party/anchor.min.js"></script> |
| 24 |
|
| 25 |
|
| 26 |
<!-- Google Analytics --> |
| 27 |
<script type="text/javascript"> |
| 28 |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| 29 |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| 30 |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| 31 |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| 32 |
|
| 33 |
ga('create', 'UA-53570216-1', 'auto'); |
| 34 |
ga('send', 'pageview'); |
| 35 |
</script> |
| 36 |
|
| 37 |
<!-- Google Fonts --> |
| 38 |
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,700italic,400,600,700" rel="stylesheet" type="text/css"> |
| 39 |
|
| 40 |
<!-- CodeMirror --> |
| 41 |
<link rel="stylesheet" href="/third_party/CodeMirror/lib/codemirror.css"> |
| 42 |
<script src="/third_party/js-yaml/dist/js-yaml.min.js"></script> |
| 43 |
<script src="/third_party/CodeMirror/lib/codemirror.js"></script> |
| 44 |
<script src="/third_party/CodeMirror/mode/yaml/yaml.js"></script> |
| 45 |
<script src="/third_party/CodeMirror/addon/edit/matchbrackets.js"></script> |
| 46 |
<script src="/js/codemirror-mode-jsonnet.js"></script> |
| 47 |
|
| 48 |
<!-- Executing Jsonnet --> |
| 49 |
<script src="/js/wasm_exec.js"></script> |
| 50 |
<script> |
| 51 |
if (!WebAssembly.instantiateStreaming) { |
| 52 |
// This function was observed to be missing on Safari 14. |
| 53 |
WebAssembly.instantiateStreaming = async (resp, importObject) => { |
| 54 |
const source = await (await resp).arrayBuffer(); |
| 55 |
return await WebAssembly.instantiate(source, importObject); |
| 56 |
}; |
| 57 |
} |
| 58 |
const go = new Go(); |
| 59 |
WebAssembly.instantiateStreaming(fetch("/js/libjsonnet.wasm"), go.importObject).then((result) => { |
| 60 |
go.run(result.instance); |
| 61 |
}); |
| 62 |
</script> |
| 63 |
<script src="/js/demo.js"></script> |
| 64 |
|
| 65 |
<!-- Navigation menus --> |
| 66 |
<script src="/js/menu.js"></script> |
| 67 |
|
| 68 |
<!-- jsonnet.org stylesheet --> |
| 69 |
<link rel="stylesheet" type="text/css" href="/css/doc.css" /> |
| 70 |
<link rel="stylesheet" media="print" href="/css/desktop.css"> |
| 71 |
<!-- The extra 16px is to account for the scrollbar, which is not always included. --> |
| 72 |
<link rel="stylesheet" media="screen and (min-width: 1296px)" href="/css/desktop.css"> |
| 73 |
<link rel="stylesheet" media="screen and (max-width: 1295px) and (min-width: 720px)" href="/css/cellphone.css"> |
| 74 |
<link rel="stylesheet" media="screen and (max-width: 719px)" href="/css/cellphone-small.css"> |
| 75 |
</head> |
| 76 |
|
| 77 |
<body> |
| 78 |
|
| 79 |
<div id=header> |
| 80 |
<div class=header2> |
| 81 |
<a id=header-logo class=header-element href="/"><img src="/img/isologo.svg"></a> |
| 82 |
<a id=header-title class=header-element href="/">Jsonnet</a> |
| 83 |
|
| 84 |
<div class="header-element menu"> |
| 85 |
<div onclick='menu_open_popup(find_enclosing_menu(this))' onmouseover='menu_open_popup(find_enclosing_menu(this))' onmouseout='menu_leave()'> |
| 86 |
Learning |
| 87 |
</div> |
| 88 |
<div class=pop-up onmouseover='menu_open_popup(find_enclosing_menu(this))' onmouseout='menu_leave()'> |
| 89 |
<a href="/learning/tutorial.html">Tutorial</a> |
| 90 |
<a href="/learning/getting_started.html">Getting Started</a> |
| 91 |
<a href="/learning/tools.html">Tools</a> |
| 92 |
<a href="/learning/community.html">Community</a> |
| 93 |
</div> |
| 94 |
</div> |
| 95 |
|
| 96 |
<div class="header-element menu"> |
| 97 |
<div onclick='menu_open_popup(find_enclosing_menu(this))' onmouseover='menu_open_popup(find_enclosing_menu(this))' onmouseout='menu_leave()'> |
| 98 |
Reference |
| 99 |
</div> |
| 100 |
<div class=pop-up onmouseover='menu_open_popup(find_enclosing_menu(this))' onmouseout='menu_leave()'> |
| 101 |
<a href="/ref/language.html">Language Reference</a> |
| 102 |
<a href="/ref/stdlib.html">Standard Library</a> |
| 103 |
<a href="/ref/spec.html">Specification</a> |
| 104 |
<a href="/ref/bindings.html">Bindings</a> |
| 105 |
</div> |
| 106 |
</div> |
| 107 |
|
| 108 |
<div class="header-element menu"> |
| 109 |
<div onclick='find_enclosing_menu(menu_open_popup(this))' onmouseover='menu_open_popup(find_enclosing_menu(this))' onmouseout='menu_leave()'> |
| 110 |
Articles |
| 111 |
</div> |
| 112 |
<div class=pop-up onmouseover='menu_open_popup(find_enclosing_menu(this))' onmouseout='menu_leave()'> |
| 113 |
<a href="/articles/fractal.1.html">Terraform & Packer</a> |
| 114 |
<a href="/articles/kubernetes.html">Kubernetes</a> |
| 115 |
<a href="/articles/output-formats.html">Output Formats</a> |
| 116 |
<a href="/articles/design.html">Design Rationale</a> |
| 117 |
<a href="/articles/comparisons.html">Comparisons</a> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
<a id=groupsmark class=header-element href="https://groups.google.com/g/jsonnet"></a> |
| 121 |
<a id=githubmark class=header-element href="https://github.com/google/jsonnet"></a> |
| 122 |
<a id=gomark class=header-element href="https://github.com/google/go-jsonnet"></a> |
| 123 |
</div> |
| 124 |
</div> |
| 125 |
|
| 126 |
{{ content }} |
| 127 |
|
| 128 |
<div class="inverse hgroup"> |
| 129 |
<div class="hgroup-inline"> |
| 130 |
<div class="panel"> |
| 131 |
<p class=footer> |
| 132 |
Except as noted, this content is licensed under Creative Commons Attribution 2.5. |
| 133 |
</p> |
| 134 |
</div> |
| 135 |
</div> |
| 136 |
</div> |
| 137 |
|
| 138 |
<script> |
| 139 |
anchors.options = { |
| 140 |
placement: 'right', |
| 141 |
visible: 'always', |
| 142 |
icon: '#' |
| 143 |
}; |
| 144 |
anchors.add('h2,h3'); |
| 145 |
</script> |
| 146 |
</body> |
| 147 |
|
| 148 |
</html> |
| 149 |
|