/usr/share/doc/libghc-json-doc/html/Text-JSON-String.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 | <!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.String</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-String.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-JSON-String.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.String</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Parsing</a><ul><li><a href="#g:2">Reading JSON</a></li><li><a href="#g:3">Writing JSON</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:GetJSON">GetJSON</a> a</li><li class="src short"><a href="#v:runGetJSON">runGetJSON</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</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="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-Types.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-Types.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-Types.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-Types.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-Types.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-Types.html#t:JSValue">JSValue</a></li><li class="src short"><a href="#v:readJSTopType">readJSTopType</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON-Types.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-Types.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:showJSObject">showJSObject</a> :: <a href="Text-JSON-Types.html#t:JSObject">JSObject</a> <a href="Text-JSON-Types.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:showJSValue">showJSValue</a> :: <a href="Text-JSON-Types.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:showJSTopType">showJSTopType</a> :: <a href="Text-JSON-Types.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></ul></div><div id="interface"><h1 id="g:1">Parsing</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:GetJSON" class="def">GetJSON</a> a <a href="src/Text-JSON-String.html#GetJSON" class="link">Source</a> <a href="#t:GetJSON" class="selflink">#</a></p><div class="doc"><p>Parsing JSON</p><p>The type of JSON parsers for String</p></div><div class="subs instances"><p id="control.i:GetJSON" class="caption collapser" onclick="toggleSection('i:GetJSON')">Instances</p><div id="section.i:GetJSON" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:GetJSON:Monad:1" class="instance expander" onclick="toggleSection('i:id:GetJSON: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-String.html#t:GetJSON">GetJSON</a></span> <a href="src/Text-JSON-String.html#line-68" class="link">Source</a> <a href="#t:GetJSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:GetJSON: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-String.html#t:GetJSON">GetJSON</a> a -> (a -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> b) -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</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-String.html#t:GetJSON">GetJSON</a> a -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> b -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</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-String.html#t:GetJSON">GetJSON</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-String.html#t:GetJSON">GetJSON</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:GetJSON:Functor:2" class="instance expander" onclick="toggleSection('i:id:GetJSON: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-String.html#t:GetJSON">GetJSON</a></span> <a href="src/Text-JSON-String.html#line-63" class="link">Source</a> <a href="#t:GetJSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:GetJSON: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-String.html#t:GetJSON">GetJSON</a> a -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> b -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</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:GetJSON:Applicative:3" class="instance expander" onclick="toggleSection('i:id:GetJSON: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-String.html#t:GetJSON">GetJSON</a></span> <a href="src/Text-JSON-String.html#line-64" class="link">Source</a> <a href="#t:GetJSON" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:GetJSON: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-String.html#t:GetJSON">GetJSON</a> a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> (a -> b) -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> a -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</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-String.html#t:GetJSON">GetJSON</a> a -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> b -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> a -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> b -> <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:runGetJSON" class="def">runGetJSON</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</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="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-String.html#runGetJSON" class="link">Source</a> <a href="#v:runGetJSON" class="selflink">#</a></p><div class="doc"><p>Run a JSON reader on an input String, returning some Haskell value.
All input will be consumed.</p></div></div><h2 id="g:2">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-Types.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-Types.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-Types.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-Types.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-Types.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-Types.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><div class="top"><p class="src"><a id="v:readJSTopType" class="def">readJSTopType</a> :: <a href="Text-JSON-String.html#t:GetJSON">GetJSON</a> <a href="Text-JSON-Types.html#t:JSValue">JSValue</a> <a href="src/Text-JSON-String.html#readJSTopType" class="link">Source</a> <a href="#v:readJSTopType" class="selflink">#</a></p><div class="doc"><p>Top level JSON can only be Arrays or Objects</p></div></div><h2 id="g:3">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-Types.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:showJSObject" class="def">showJSObject</a> :: <a href="Text-JSON-Types.html#t:JSObject">JSObject</a> <a href="Text-JSON-Types.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: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:showJSValue" class="def">showJSValue</a> :: <a href="Text-JSON-Types.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><div class="top"><p class="src"><a id="v:showJSTopType" class="def">showJSTopType</a> :: <a href="Text-JSON-Types.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#showJSTopType" class="link">Source</a> <a href="#v:showJSTopType" class="selflink">#</a></p><div class="doc"><p>Writing JSON</p><p>Show strict JSON top level types. Values not permitted
at the top level are wrapped in a singleton array.</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>
|