Current section
Files
Jump to
Current section
Files
gen/docs/generic_json/index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>generic_json - gj</title>
<link rel="stylesheet" href="../index.css" type="text/css" />
</head>
<body>
<header class="page-header">
<h2>
gj<!-- - -->
</h2>
</header>
<div class="page">
<nav class="sidebar">
<a class="sidebar-toggle" href="#">
<svg
aria-hidden="true"
focusable="false"
data-prefix="fas"
data-icon="bars"
class="svg-inline--fa fa-bars fa-w-14"
role="img"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 448 512"
>
<path
fill="#fff"
d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"
>
</path>
</svg>
</a>
<h2>Pages</h2>
<ul>
<li><a href="../index.html">README</a></li>
</ul>
<h2>Modules</h2>
<ul>
<li><a href="../generic_json/">generic_json</a></li>
<li><a href="../gj/">gj</a></li>
<li><a href="../gj_decode/">gj_decode</a></li>
<li><a href="../gj_encode/">gj_encode</a></li>
</ul>
<h2>Types</h2>
<ul>
<li><a href="#JSON">JSON</a></li>
</ul>
</nav>
<main class="content">
<h1 class="module-name">generic_json</h1>
<section class="module-members">
<a href="#module-types">
<h1 id="module-types" class="module-member-kind">Types</h1>
</a>
<div class="member">
<a href="#JSON">
<h2 id="JSON" class="member-name">
JSON
</h2>
</a>
<div class="custom-type-constructors">
<div class="rendered-markdown"><p>Type for representing JSON generically</p>
<p>This is the type that <code>gj.decode</code> produces and <code>gj.encode</code> takes</p>
</div>
<pre>pub type JSON {
Object(List(tuple(String, JSON)))
Array(List(JSON))
Number(Float)
Boolean(Bool)
String(String)
Null
}</pre>
<h3>
Constructors
</h3>
<ul>
<li>
<code class="constructor-name">Object(List(tuple(String, JSON)))</code>
</li>
<li>
<code class="constructor-name">Array(List(JSON))</code>
</li>
<li>
<code class="constructor-name">Number(Float)</code>
</li>
<li>
<code class="constructor-name">Boolean(Bool)</code>
</li>
<li>
<code class="constructor-name">String(String)</code>
</li>
<li>
<code class="constructor-name">Null</code>
</li>
</ul>
</div>
</div>
</section>
</main>
</div>
<script>const pride = () => document.querySelector('body').classList.toggle('show-pride')</script>
<a class="pride-button" onclick="pride()">✨</a>
<footer class="pride" onclick="pride()">
<div class="blue">Lucy</div>
<div class="pink">says</div>
<div class="white">trans</div>
<div class="pink">rights</div>
<div class="blue">✨</div>
</footer>
</body>
</html>