/usr/share/doc/libghc-json-doc/html/Text-JSON.html is in libghc-json-doc 0.9.1-5build4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.JSON</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-JSON.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-JSON.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">json-0.9.1: Support for serialising Haskell to and from JSON</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) Galois Inc. 2007-2009</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>Sigbjorn Finne <sof@galois.com></td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Text.JSON</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">JSON Types</a></li><li><a href="#g:2">Serialization to and from JSValues</a></li><li><a href="#g:3">Encoding and Decoding</a></li><li><a href="#g:4">Wrapper Types</a></li><li><a href="#g:5">Serialization to and from Strings.</a><ul><li><a href="#g:6">Reading JSON</a></li><li><a href="#g:7">Writing JSON</a></li><li><a href="#g:8">Instance helpers</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty"> </div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:JSValue">JSValue</a><ul class="subs"><li>= <a href="#v:JSNull">JSNull</a></li><li>| <a href="#v:JSBool">JSBool</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li>| <a href="#v:JSRational">JSRational</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Rational">Rational</a></li><li>| <a href="#v:JSString">JSString</a> <a href="Text-JSON.html#t:JSString">JSString</a></li><li>| <a href="#v:JSArray">JSArray</a> [<a href="Text-JSON.html#t:JSValue">JSValue</a>]</li><li>| <a href="#v:JSObject">JSObject</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> <a href="Text-JSON.html#t:JSValue">JSValue</a>)</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:JSON">JSON</a> a <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Result">Result</a> a<ul class="subs"><li>= <a href="#v:Ok">Ok</a> a</li><li>| <a href="#v:Error">Error</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><a href="#v:encode">encode</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:decode">decode</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:Result">Result</a> a</li><li class="src short"><a href="#v:encodeStrict">encodeStrict</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:decodeStrict">decodeStrict</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:Result">Result</a> a</li><li class="src short"><span class="keyword">data</span> <a href="#t:JSString">JSString</a></li><li class="src short"><a href="#v:toJSString">toJSString</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:JSString">JSString</a></li><li class="src short"><a href="#v:fromJSString">fromJSString</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:JSObject">JSObject</a> e</li><li class="src short"><a href="#v:toJSObject">toJSObject</a> :: [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, a)] -> <a href="Text-JSON.html#t:JSObject">JSObject</a> a</li><li class="src short"><a href="#v:fromJSObject">fromJSObject</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, e)]</li><li class="src short"><a href="#v:resultToEither">resultToEither</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> a</li><li class="src short"><a href="#v:readJSNull">readJSNull</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:readJSBool">readJSBool</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:readJSString">readJSString</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:readJSRational">readJSRational</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Rational">Rational</a></li><li class="src short"><a href="#v:readJSArray">readJSArray</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:readJSObject">readJSObject</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:readJSValue">readJSValue</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:showJSNull">showJSNull</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showJSBool">showJSBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showJSArray">showJSArray</a> :: [<a href="Text-JSON.html#t:JSValue">JSValue</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showJSRational">showJSRational</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showJSRational-39-">showJSRational'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showJSObject">showJSObject</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showJSValue">showJSValue</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:makeObj">makeObj</a> :: [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="Text-JSON.html#t:JSValue">JSValue</a>)] -> <a href="Text-JSON.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:valFromObj">valFromObj</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:JSObject">JSObject</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> a</li><li class="src short"><span class="keyword">class</span> <a href="#t:JSKey">JSKey</a> a <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><a href="#v:encJSDict">encJSDict</a> :: (<a href="Text-JSON.html#t:JSKey">JSKey</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b) => [(a, b)] -> <a href="Text-JSON.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:decJSDict">decJSDict</a> :: (<a href="Text-JSON.html#t:JSKey">JSKey</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [(a, b)]</li></ul></div><div id="interface"><h1 id="g:1">JSON Types</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:JSValue" class="def">JSValue</a> <a href="src/Text-JSON-Types.html#JSValue" class="link">Source</a> <a href="#t:JSValue" class="selflink">#</a></p><div class="doc"><p>JSON values</p><p>The type to which we encode Haskell values. There's a set
of primitives, and a couple of heterogenous collection types.</p><p>Objects:</p><p>An object structure is represented as a pair of curly brackets
surrounding zero or more name/value pairs (or members). A name is a
string. A single colon comes after each name, separating the name
from the value. A single comma separates a value from a
following name.</p><p>Arrays:</p><p>An array structure is represented as square brackets surrounding
zero or more values (or elements). Elements are separated by commas.</p><p>Only valid JSON can be constructed this way</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:JSNull" class="def">JSNull</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:JSBool" class="def">JSBool</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:JSRational" class="def">JSRational</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Rational">Rational</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:JSString" class="def">JSString</a> <a href="Text-JSON.html#t:JSString">JSString</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:JSArray" class="def">JSArray</a> [<a href="Text-JSON.html#t:JSValue">JSValue</a>]</td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:JSObject" class="def">JSObject</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> <a href="Text-JSON.html#t:JSValue">JSValue</a>)</td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:JSValue" class="caption collapser" onclick="toggleSection('i:JSValue')">Instances</p><div id="section.i:JSValue" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSValue:Eq:1" class="instance expander" onclick="toggleSection('i:id:JSValue:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></span> <a href="src/Text-JSON-Types.html#line-64" class="link">Source</a> <a href="#t:JSValue" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSValue:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSValue:Ord:2" class="instance expander" onclick="toggleSection('i:id:JSValue:Ord:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></span> <a href="src/Text-JSON-Types.html#line-64" class="link">Source</a> <a href="#t:JSValue" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSValue:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSValue:Read:3" class="instance expander" onclick="toggleSection('i:id:JSValue:Read:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></span> <a href="src/Text-JSON-Types.html#line-64" class="link">Source</a> <a href="#t:JSValue" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSValue:Read:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Text-JSON.html#t:JSValue">JSValue</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Text-JSON.html#t:JSValue">JSValue</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSValue:Show:4" class="instance expander" onclick="toggleSection('i:id:JSValue:Show:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></span> <a href="src/Text-JSON-Types.html#line-64" class="link">Source</a> <a href="#t:JSValue" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSValue:Show:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Text-JSON.html#t:JSValue">JSValue</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSValue:JSON:5" class="instance expander" onclick="toggleSection('i:id:JSValue:JSON:5')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></span> <a href="src/Text-JSON.html#line-167" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc"><p>To ensure we generate valid JSON, we map Haskell types to JSValue
internally, then pretty print that.</p></td></tr><tr><td colspan="2"><div id="section.i:id:JSValue:JSON:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="Text-JSON.html#t:JSValue">JSValue</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="Text-JSON.html#t:JSValue">JSValue</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:2">Serialization to and from JSValues</h1><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:JSON" class="def">JSON</a> a <span class="keyword">where</span> <a href="src/Text-JSON.html#JSON" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></p><div class="doc"><p>The class of types serialisable to and from JSON</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Text-JSON.html#v:readJSON">readJSON</a>, <a href="Text-JSON.html#v:showJSON">showJSON</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:readJSON" class="def">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a id="v:showJSON" class="def">showJSON</a> :: a -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a id="v:readJSONs" class="def">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [a] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a id="v:showJSONs" class="def">showJSONs</a> :: [a] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:JSON" class="caption collapser" onclick="toggleSection('i:JSON')">Instances</p><div id="section.i:JSON" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:1" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:1')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></span> <a href="src/Text-JSON.html#line-194" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:2" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:2')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a></span> <a href="src/Text-JSON.html#line-199" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Char.html#t:Char">Char</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:3" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:3')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a></span> <a href="src/Text-JSON.html#line-287" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Double">Double</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:4" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:4')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Float">Float</a></span> <a href="src/Text-JSON.html#line-294" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Float">Float</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Float">Float</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Float">Float</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Float">Float</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:5" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:5')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></span> <a href="src/Text-JSON.html#line-232" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:6" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:6')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int8">Int8</a></span> <a href="src/Text-JSON.html#line-265" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int8">Int8</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int8">Int8</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int8">Int8</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int8">Int8</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:7" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:7')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int16">Int16</a></span> <a href="src/Text-JSON.html#line-270" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int16">Int16</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int16">Int16</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int16">Int16</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int16">Int16</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:8" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:8')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int32">Int32</a></span> <a href="src/Text-JSON.html#line-275" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int32">Int32</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int32">Int32</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int32">Int32</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int32">Int32</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:9" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:9')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int64">Int64</a></span> <a href="src/Text-JSON.html#line-280" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int64">Int64</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int64">Int64</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int64">Int64</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int64">Int64</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:10" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:10')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a></span> <a href="src/Text-JSON.html#line-226" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integer">Integer</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:11" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:11')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a></span> <a href="src/Text-JSON.html#line-212" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:12" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:12')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word">Word</a></span> <a href="src/Text-JSON.html#line-238" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word">Word</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word">Word</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word">Word</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word">Word</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:13" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:13')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></span> <a href="src/Text-JSON.html#line-245" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:14" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:14')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word16">Word16</a></span> <a href="src/Text-JSON.html#line-250" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word16">Word16</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word16">Word16</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word16">Word16</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word16">Word16</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:15" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:15')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word32">Word32</a></span> <a href="src/Text-JSON.html#line-255" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:15" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word32">Word32</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word32">Word32</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word32">Word32</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word32">Word32</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:16" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:16')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word64">Word64</a></span> <a href="src/Text-JSON.html#line-260" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:16" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word64">Word64</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word64">Word64</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word64">Word64</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word64">Word64</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:17" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:17')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> ()</span> <a href="src/Text-JSON.html#line-327" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:17" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> () <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: () -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [()] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [()] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:18" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:18')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></span> <a href="src/Text-JSON.html#line-420" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:18" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:19" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:19')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></span> <a href="src/Text-JSON.html#line-416" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:19" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:20" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:20')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntSet.html#t:IntSet">IntSet</a></span> <a href="src/Text-JSON.html#line-394" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:20" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntSet.html#t:IntSet">IntSet</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntSet.html#t:IntSet">IntSet</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntSet.html#t:IntSet">IntSet</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntSet.html#t:IntSet">IntSet</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:21" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:21')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></span> <a href="src/Text-JSON.html#line-427" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:21" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:22" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:22')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="Text-JSON.html#t:JSString">JSString</a></span> <a href="src/Text-JSON.html#line-177" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:22" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="Text-JSON.html#t:JSString">JSString</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="Text-JSON.html#t:JSString">JSString</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:23" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:23')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a></span> <a href="src/Text-JSON.html#line-167" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc"><p>To ensure we generate valid JSON, we map Haskell types to JSValue
internally, then pretty print that.</p></td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:23" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="Text-JSON.html#t:JSValue">JSValue</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="Text-JSON.html#t:JSValue">JSValue</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:24" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:24')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="Text-JSON.html#t:JSON">JSON</a> [a]</span> <a href="src/Text-JSON.html#line-359" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:24" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [a] <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: [a] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [[a]] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [[a]] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:25" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:25')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="Text-JSON.html#t:JSON">JSON</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</span> <a href="src/Text-JSON.html#line-302" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:25" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:26" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:26')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="Text-JSON.html#t:JSON">JSON</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntMap-Lazy.html#t:IntMap">IntMap</a> a)</span> <a href="src/Text-JSON.html#line-370" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:26" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntMap-Lazy.html#t:IntMap">IntMap</a> a) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntMap-Lazy.html#t:IntMap">IntMap</a> a -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntMap-Lazy.html#t:IntMap">IntMap</a> a] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-IntMap-Lazy.html#t:IntMap">IntMap</a> a] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:27" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:27')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> a) => <a href="Text-JSON.html#t:JSON">JSON</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Set.html#t:Set">Set</a> a)</span> <a href="src/Text-JSON.html#line-386" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:27" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Set.html#t:Set">Set</a> a) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Set.html#t:Set">Set</a> a -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Set.html#t:Set">Set</a> a] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Set.html#t:Set">Set</a> a] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:28" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:28')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="Text-JSON.html#t:JSON">JSON</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> a)</span> <a href="src/Text-JSON.html#line-182" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:28" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> a) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> a -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="Text-JSON.html#t:JSObject">JSObject</a> a] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="Text-JSON.html#t:JSObject">JSObject</a> a] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:29" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:29')"></span> (<a href="Text-JSON.html#t:JSON">JSON</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b) => <a href="Text-JSON.html#t:JSON">JSON</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> a b)</span> <a href="src/Text-JSON.html#line-313" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:29" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> a b) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> a b -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> a b] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> a b] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:30" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:30')"></span> (<a href="Text-JSON.html#t:JSON">JSON</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b) => <a href="Text-JSON.html#t:JSON">JSON</a> (a, b)</span> <a href="src/Text-JSON.html#line-332" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:30" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (a, b) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: (a, b) -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [(a, b)] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [(a, b)] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:31" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:31')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ix.html#t:Ix">Ix</a> i, <a href="Text-JSON.html#t:JSON">JSON</a> i, <a href="Text-JSON.html#t:JSON">JSON</a> e) => <a href="Text-JSON.html#t:JSON">JSON</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/array-0.5.1.1/Data-Array.html#t:Array">Array</a> i e)</span> <a href="src/Text-JSON.html#line-390" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:31" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/array-0.5.1.1/Data-Array.html#t:Array">Array</a> i e) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/array-0.5.1.1/Data-Array.html#t:Array">Array</a> i e -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/array-0.5.1.1/Data-Array.html#t:Array">Array</a> i e] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/array-0.5.1.1/Data-Array.html#t:Array">Array</a> i e] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:32" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:32')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b) => <a href="Text-JSON.html#t:JSON">JSON</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> a b)</span> <a href="src/Text-JSON.html#line-366" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:32" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> a b) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> a b -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> a b] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> a b] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:33" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:33')"></span> (<a href="Text-JSON.html#t:JSON">JSON</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b, <a href="Text-JSON.html#t:JSON">JSON</a> c) => <a href="Text-JSON.html#t:JSON">JSON</a> (a, b, c)</span> <a href="src/Text-JSON.html#line-337" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:33" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (a, b, c) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: (a, b, c) -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [(a, b, c)] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [(a, b, c)] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSON:JSON:34" class="instance expander" onclick="toggleSection('i:ic:JSON:JSON:34')"></span> (<a href="Text-JSON.html#t:JSON">JSON</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b, <a href="Text-JSON.html#t:JSON">JSON</a> c, <a href="Text-JSON.html#t:JSON">JSON</a> d) => <a href="Text-JSON.html#t:JSON">JSON</a> (a, b, c, d)</span> <a href="src/Text-JSON.html#line-345" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSON:JSON:34" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (a, b, c, d) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: (a, b, c, d) -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [(a, b, c, d)] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [(a, b, c, d)] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:3">Encoding and Decoding</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Result" class="def">Result</a> a <a href="src/Text-JSON.html#Result" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></p><div class="doc"><p>A type for parser results</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Ok" class="def">Ok</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:Error" class="def">Error</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Result" class="caption collapser" onclick="toggleSection('i:Result')">Instances</p><div id="section.i:Result" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Result:Monad:1" class="instance expander" onclick="toggleSection('i:id:Result:Monad:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> <a href="Text-JSON.html#t:Result">Result</a></span> <a href="src/Text-JSON.html#line-152" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Result:Monad:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(>>=)</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> (a -> <a href="Text-JSON.html#t:Result">Result</a> b) -> <a href="Text-JSON.html#t:Result">Result</a> b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(>>)</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> b -> <a href="Text-JSON.html#t:Result">Result</a> b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Result:Functor:2" class="instance expander" onclick="toggleSection('i:id:Result:Functor:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> <a href="Text-JSON.html#t:Result">Result</a></span> <a href="src/Text-JSON.html#line-136" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Result:Functor:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -> b) -> <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Text-JSON.html#t:Result">Result</a> b -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Result:Applicative:3" class="instance expander" onclick="toggleSection('i:id:Result:Applicative:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="Text-JSON.html#t:Result">Result</a></span> <a href="src/Text-JSON.html#line-138" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Result:Applicative:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Text-JSON.html#t:Result">Result</a> (a -> b) -> <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*>)</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> b -> <a href="Text-JSON.html#t:Result">Result</a> b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> b -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Result:Alternative:4" class="instance expander" onclick="toggleSection('i:id:Result:Alternative:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a> <a href="Text-JSON.html#t:Result">Result</a></span> <a href="src/Text-JSON.html#line-142" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Result:Alternative:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:empty">empty</a> :: <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(<|>)</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:-60--124--62-" class="selflink">#</a></p><p class="src"><a href="#v:some">some</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> [a] <a href="#v:many" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Result:MonadPlus:5" class="instance expander" onclick="toggleSection('i:id:Result:MonadPlus:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> <a href="Text-JSON.html#t:Result">Result</a></span> <a href="src/Text-JSON.html#line-147" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Result:MonadPlus:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mzero">mzero</a> :: <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:mzero" class="selflink">#</a></p><p class="src"><a href="#v:mplus">mplus</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="#v:mplus" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Result:Eq:6" class="instance expander" onclick="toggleSection('i:id:Result:Eq:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Text-JSON.html#t:Result">Result</a> a)</span> <a href="src/Text-JSON.html#line-129" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Result:Eq:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Result:Show:7" class="instance expander" onclick="toggleSection('i:id:Result:Show:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Text-JSON.html#t:Result">Result</a> a)</span> <a href="src/Text-JSON.html#line-129" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Result:Show:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Text-JSON.html#t:Result">Result</a> a] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:encode" class="def">encode</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON.html#encode" class="link">Source</a> <a href="#v:encode" class="selflink">#</a></p><div class="doc"><p>Encode a Haskell value into a string, in JSON format.</p><p>This is a superset of JSON, as types other than
Array and Object are allowed at the top level.</p></div></div><div class="top"><p class="src"><a id="v:decode" class="def">decode</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="src/Text-JSON.html#decode" class="link">Source</a> <a href="#v:decode" class="selflink">#</a></p><div class="doc"><p>Decode a String representing a JSON value
(either an object, array, bool, number, null)</p><p>This is a superset of JSON, as types other than
Array and Object are allowed at the top level.</p></div></div><div class="top"><p class="src"><a id="v:encodeStrict" class="def">encodeStrict</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON.html#encodeStrict" class="link">Source</a> <a href="#v:encodeStrict" class="selflink">#</a></p><div class="doc"><p>Encode a value as a String in strict JSON format.
This follows the spec, and requires all values
at the top level to be wrapped in either an Array or Object.
JSON types to be an Array or Object.</p></div></div><div class="top"><p class="src"><a id="v:decodeStrict" class="def">decodeStrict</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="src/Text-JSON.html#decodeStrict" class="link">Source</a> <a href="#v:decodeStrict" class="selflink">#</a></p><div class="doc"><p>Decode a String representing a strict JSON value.
This follows the spec, and requires top level
JSON types to be an Array or Object.</p></div></div><h1 id="g:4">Wrapper Types</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:JSString" class="def">JSString</a> <a href="src/Text-JSON-Types.html#JSString" class="link">Source</a> <a href="#t:JSString" class="selflink">#</a></p><div class="doc"><p>Strings can be represented a little more efficiently in JSON</p></div><div class="subs instances"><p id="control.i:JSString" class="caption collapser" onclick="toggleSection('i:JSString')">Instances</p><div id="section.i:JSString" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSString:Eq:1" class="instance expander" onclick="toggleSection('i:id:JSString:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Text-JSON.html#t:JSString">JSString</a></span> <a href="src/Text-JSON-Types.html#line-68" class="link">Source</a> <a href="#t:JSString" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSString:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSString:Ord:2" class="instance expander" onclick="toggleSection('i:id:JSString:Ord:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Text-JSON.html#t:JSString">JSString</a></span> <a href="src/Text-JSON-Types.html#line-68" class="link">Source</a> <a href="#t:JSString" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSString:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSString:Read:3" class="instance expander" onclick="toggleSection('i:id:JSString:Read:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Text-JSON.html#t:JSString">JSString</a></span> <a href="src/Text-JSON-Types.html#line-68" class="link">Source</a> <a href="#t:JSString" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSString:Read:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Text-JSON.html#t:JSString">JSString</a>] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Text-JSON.html#t:JSString">JSString</a>] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSString:Show:4" class="instance expander" onclick="toggleSection('i:id:JSString:Show:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Text-JSON.html#t:JSString">JSString</a></span> <a href="src/Text-JSON-Types.html#line-68" class="link">Source</a> <a href="#t:JSString" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSString:Show:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Text-JSON.html#t:JSString">JSString</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSString:JSKey:5" class="instance expander" onclick="toggleSection('i:id:JSString:JSKey:5')"></span> <a href="Text-JSON.html#t:JSKey">JSKey</a> <a href="Text-JSON.html#t:JSString">JSString</a></span> <a href="src/Text-JSON.html#line-464" class="link">Source</a> <a href="#t:JSKey" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSString:JSKey:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toJSKey">toJSKey</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON.html#toJSKey" class="link">Source</a> <a href="#v:toJSKey" class="selflink">#</a></p><p class="src"><a href="#v:fromJSKey">fromJSKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="src/Text-JSON.html#fromJSKey" class="link">Source</a> <a href="#v:fromJSKey" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSString:JSON:6" class="instance expander" onclick="toggleSection('i:id:JSString:JSON:6')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> <a href="Text-JSON.html#t:JSString">JSString</a></span> <a href="src/Text-JSON.html#line-177" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSString:JSON:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="Text-JSON.html#t:JSString">JSString</a>] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="Text-JSON.html#t:JSString">JSString</a>] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:toJSString" class="def">toJSString</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="src/Text-JSON-Types.html#toJSString" class="link">Source</a> <a href="#v:toJSString" class="selflink">#</a></p><div class="doc"><p>Turn a Haskell string into a JSON string.</p></div></div><div class="top"><p class="src"><a id="v:fromJSString" class="def">fromJSString</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON-Types.html#fromJSString" class="link">Source</a> <a href="#v:fromJSString" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:JSObject" class="def">JSObject</a> e <a href="src/Text-JSON-Types.html#JSObject" class="link">Source</a> <a href="#t:JSObject" class="selflink">#</a></p><div class="doc"><p>As can association lists</p></div><div class="subs instances"><p id="control.i:JSObject" class="caption collapser" onclick="toggleSection('i:JSObject')">Instances</p><div id="section.i:JSObject" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSObject:Eq:1" class="instance expander" onclick="toggleSection('i:id:JSObject:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> e => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> e)</span> <a href="src/Text-JSON-Types.html#line-77" class="link">Source</a> <a href="#t:JSObject" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSObject:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSObject:Ord:2" class="instance expander" onclick="toggleSection('i:id:JSObject:Ord:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> e => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> e)</span> <a href="src/Text-JSON-Types.html#line-77" class="link">Source</a> <a href="#t:JSObject" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSObject:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSObject:Read:3" class="instance expander" onclick="toggleSection('i:id:JSObject:Read:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> e => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Read.html#t:Read">Read</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> e)</span> <a href="src/Text-JSON-Types.html#line-77" class="link">Source</a> <a href="#t:JSObject" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSObject:Read:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> e) <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Text-JSON.html#t:JSObject">JSObject</a> e] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> e) <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Text-JSON.html#t:JSObject">JSObject</a> e] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSObject:Show:4" class="instance expander" onclick="toggleSection('i:id:JSObject:Show:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> e => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> e)</span> <a href="src/Text-JSON-Types.html#line-77" class="link">Source</a> <a href="#t:JSObject" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSObject:Show:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Text-JSON.html#t:JSObject">JSObject</a> e] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:JSObject:JSON:5" class="instance expander" onclick="toggleSection('i:id:JSObject:JSON:5')"></span> <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="Text-JSON.html#t:JSON">JSON</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> a)</span> <a href="src/Text-JSON.html#line-182" class="link">Source</a> <a href="#t:JSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:JSObject:JSON:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readJSON">readJSON</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> (<a href="Text-JSON.html#t:JSObject">JSObject</a> a) <a href="src/Text-JSON.html#readJSON" class="link">Source</a> <a href="#v:readJSON" class="selflink">#</a></p><p class="src"><a href="#v:showJSON">showJSON</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> a -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSON" class="link">Source</a> <a href="#v:showJSON" class="selflink">#</a></p><p class="src"><a href="#v:readJSONs">readJSONs</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [<a href="Text-JSON.html#t:JSObject">JSObject</a> a] <a href="src/Text-JSON.html#readJSONs" class="link">Source</a> <a href="#v:readJSONs" class="selflink">#</a></p><p class="src"><a href="#v:showJSONs">showJSONs</a> :: [<a href="Text-JSON.html#t:JSObject">JSObject</a> a] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#showJSONs" class="link">Source</a> <a href="#v:showJSONs" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:toJSObject" class="def">toJSObject</a> :: [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, a)] -> <a href="Text-JSON.html#t:JSObject">JSObject</a> a <a href="src/Text-JSON-Types.html#toJSObject" class="link">Source</a> <a href="#v:toJSObject" class="selflink">#</a></p><div class="doc"><p>Make JSON object out of an association list.</p></div></div><div class="top"><p class="src"><a id="v:fromJSObject" class="def">fromJSObject</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> e -> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, e)] <a href="src/Text-JSON-Types.html#fromJSObject" class="link">Source</a> <a href="#v:fromJSObject" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:resultToEither" class="def">resultToEither</a> :: <a href="Text-JSON.html#t:Result">Result</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> a <a href="src/Text-JSON.html#resultToEither" class="link">Source</a> <a href="#v:resultToEither" class="selflink">#</a></p><div class="doc"><p>Map Results to Eithers</p></div></div><h1 id="g:5">Serialization to and from Strings.</h1><h2 id="g:6">Reading JSON</h2><div class="top"><p class="src"><a id="v:readJSNull" class="def">readJSNull</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON-String.html#readJSNull" class="link">Source</a> <a href="#v:readJSNull" class="selflink">#</a></p><div class="doc"><p>Read the JSON null type</p></div></div><div class="top"><p class="src"><a id="v:readJSBool" class="def">readJSBool</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON-String.html#readJSBool" class="link">Source</a> <a href="#v:readJSBool" class="selflink">#</a></p><div class="doc"><p>Read the JSON Bool type</p></div></div><div class="top"><p class="src"><a id="v:readJSString" class="def">readJSString</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON-String.html#readJSString" class="link">Source</a> <a href="#v:readJSString" class="selflink">#</a></p><div class="doc"><p>Read the JSON String type</p></div></div><div class="top"><p class="src"><a id="v:readJSRational" class="def">readJSRational</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Rational">Rational</a> <a href="src/Text-JSON-String.html#readJSRational" class="link">Source</a> <a href="#v:readJSRational" class="selflink">#</a></p><div class="doc"><p>Read an Integer or Double in JSON format, returning a Rational</p></div></div><div class="top"><p class="src"><a id="v:readJSArray" class="def">readJSArray</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON-String.html#readJSArray" class="link">Source</a> <a href="#v:readJSArray" class="selflink">#</a></p><div class="doc"><p>Read a list in JSON format</p></div></div><div class="top"><p class="src"><a id="v:readJSObject" class="def">readJSObject</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON-String.html#readJSObject" class="link">Source</a> <a href="#v:readJSObject" class="selflink">#</a></p><div class="doc"><p>Read an object in JSON format</p></div></div><div class="top"><p class="src"><a id="v:readJSValue" class="def">readJSValue</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON-String.html#readJSValue" class="link">Source</a> <a href="#v:readJSValue" class="selflink">#</a></p><div class="doc"><p>Read one of several possible JS types</p></div></div><h2 id="g:7">Writing JSON</h2><div class="top"><p class="src"><a id="v:showJSNull" class="def">showJSNull</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="src/Text-JSON-String.html#showJSNull" class="link">Source</a> <a href="#v:showJSNull" class="selflink">#</a></p><div class="doc"><p>Write the JSON null type</p></div></div><div class="top"><p class="src"><a id="v:showJSBool" class="def">showJSBool</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="src/Text-JSON-String.html#showJSBool" class="link">Source</a> <a href="#v:showJSBool" class="selflink">#</a></p><div class="doc"><p>Write the JSON Bool type</p></div></div><div class="top"><p class="src"><a id="v:showJSArray" class="def">showJSArray</a> :: [<a href="Text-JSON.html#t:JSValue">JSValue</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="src/Text-JSON-String.html#showJSArray" class="link">Source</a> <a href="#v:showJSArray" class="selflink">#</a></p><div class="doc"><p>Show a list in JSON format</p></div></div><div class="top"><p class="src"><a id="v:showJSRational" class="def">showJSRational</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="src/Text-JSON-String.html#showJSRational" class="link">Source</a> <a href="#v:showJSRational" class="selflink">#</a></p><div class="doc"><p>Show a Rational in JSON format</p></div></div><div class="top"><p class="src"><a id="v:showJSRational-39-" class="def">showJSRational'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="src/Text-JSON-String.html#showJSRational%27" class="link">Source</a> <a href="#v:showJSRational-39-" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:showJSObject" class="def">showJSObject</a> :: <a href="Text-JSON.html#t:JSObject">JSObject</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="src/Text-JSON-String.html#showJSObject" class="link">Source</a> <a href="#v:showJSObject" class="selflink">#</a></p><div class="doc"><p>Show an association list in JSON format</p></div></div><div class="top"><p class="src"><a id="v:showJSValue" class="def">showJSValue</a> :: <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="src/Text-JSON-String.html#showJSValue" class="link">Source</a> <a href="#v:showJSValue" class="selflink">#</a></p><div class="doc"><p>Show JSON values</p></div></div><h2 id="g:8">Instance helpers</h2><div class="top"><p class="src"><a id="v:makeObj" class="def">makeObj</a> :: [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="Text-JSON.html#t:JSValue">JSValue</a>)] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#makeObj" class="link">Source</a> <a href="#v:makeObj" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:valFromObj" class="def">valFromObj</a> :: <a href="Text-JSON.html#t:JSON">JSON</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:JSObject">JSObject</a> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> a <a href="src/Text-JSON.html#valFromObj" class="link">Source</a> <a href="#v:valFromObj" class="selflink">#</a></p><div class="doc"><p>Pull a value out of a JSON object.</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:JSKey" class="def">JSKey</a> a <span class="keyword">where</span> <a href="src/Text-JSON.html#JSKey" class="link">Source</a> <a href="#t:JSKey" class="selflink">#</a></p><div class="doc"><p>Haskell types that can be used as keys in JSON objects.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Text-JSON.html#v:toJSKey">toJSKey</a>, <a href="Text-JSON.html#v:fromJSKey">fromJSKey</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:toJSKey" class="def">toJSKey</a> :: a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON.html#toJSKey" class="link">Source</a> <a href="#v:toJSKey" class="selflink">#</a></p><p class="src"><a id="v:fromJSKey" class="def">fromJSKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> a <a href="src/Text-JSON.html#fromJSKey" class="link">Source</a> <a href="#v:fromJSKey" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:JSKey" class="caption collapser" onclick="toggleSection('i:JSKey')">Instances</p><div id="section.i:JSKey" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSKey:JSKey:1" class="instance expander" onclick="toggleSection('i:ic:JSKey:JSKey:1')"></span> <a href="Text-JSON.html#t:JSKey">JSKey</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></span> <a href="src/Text-JSON.html#line-468" class="link">Source</a> <a href="#t:JSKey" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSKey:JSKey:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toJSKey">toJSKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON.html#toJSKey" class="link">Source</a> <a href="#v:toJSKey" class="selflink">#</a></p><p class="src"><a href="#v:fromJSKey">fromJSKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="src/Text-JSON.html#fromJSKey" class="link">Source</a> <a href="#v:fromJSKey" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSKey:JSKey:2" class="instance expander" onclick="toggleSection('i:ic:JSKey:JSKey:2')"></span> <a href="Text-JSON.html#t:JSKey">JSKey</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></span> <a href="src/Text-JSON.html#line-476" class="link">Source</a> <a href="#t:JSKey" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSKey:JSKey:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toJSKey">toJSKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON.html#toJSKey" class="link">Source</a> <a href="#v:toJSKey" class="selflink">#</a></p><p class="src"><a href="#v:fromJSKey">fromJSKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON.html#fromJSKey" class="link">Source</a> <a href="#v:fromJSKey" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:JSKey:JSKey:3" class="instance expander" onclick="toggleSection('i:ic:JSKey:JSKey:3')"></span> <a href="Text-JSON.html#t:JSKey">JSKey</a> <a href="Text-JSON.html#t:JSString">JSString</a></span> <a href="src/Text-JSON.html#line-464" class="link">Source</a> <a href="#t:JSKey" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:JSKey:JSKey:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toJSKey">toJSKey</a> :: <a href="Text-JSON.html#t:JSString">JSString</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Text-JSON.html#toJSKey" class="link">Source</a> <a href="#v:toJSKey" class="selflink">#</a></p><p class="src"><a href="#v:fromJSKey">fromJSKey</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Text-JSON.html#t:JSString">JSString</a> <a href="src/Text-JSON.html#fromJSKey" class="link">Source</a> <a href="#v:fromJSKey" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:encJSDict" class="def">encJSDict</a> :: (<a href="Text-JSON.html#t:JSKey">JSKey</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b) => [(a, b)] -> <a href="Text-JSON.html#t:JSValue">JSValue</a> <a href="src/Text-JSON.html#encJSDict" class="link">Source</a> <a href="#v:encJSDict" class="selflink">#</a></p><div class="doc"><p>Encode an association list as <code><a href="Text-JSON.html#t:JSObject">JSObject</a></code> value.</p></div></div><div class="top"><p class="src"><a id="v:decJSDict" class="def">decJSDict</a> :: (<a href="Text-JSON.html#t:JSKey">JSKey</a> a, <a href="Text-JSON.html#t:JSON">JSON</a> b) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Text-JSON.html#t:JSValue">JSValue</a> -> <a href="Text-JSON.html#t:Result">Result</a> [(a, b)] <a href="src/Text-JSON.html#decJSDict" class="link">Source</a> <a href="#v:decJSDict" class="selflink">#</a></p><div class="doc"><p>Decode a <code><a href="Text-JSON.html#t:JSObject">JSObject</a></code> value into an association list.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|