This file is indexed.

/usr/share/doc/libghc-lens-doc/html/Data-Aeson-Lens.html is in libghc-lens-doc 4.1.2.1-3.

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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!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>Data.Aeson.Lens</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Aeson-Lens.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Aeson-Lens.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">lens-4.1.2.1: Lenses, Folds and Traversals</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Data.Aeson.Lens</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Numbers
</a></li><li><a href="#g:2">Primitive
</a></li><li><a href="#g:3">Objects and Arrays
</a></li><li><a href="#g:4">Decoding
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</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">class</span>  <a href="#t:AsNumber">AsNumber</a> t  <span class="keyword">where</span><ul class="subs"><li><a href="#v:_Number">_Number</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a></li><li><a href="#v:_Double">_Double</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a></li><li><a href="#v:_Integer">_Integer</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a></li></ul></li><li class="src short"><a href="#v:_Integral">_Integral</a> :: (<a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> t, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a) =&gt; <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t a</li><li class="src short"><a href="#v:nonNull">nonNull</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Primitive">Primitive</a> <ul class="subs"><li>= <a href="#v:StringPrim">StringPrim</a> !<a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a>  </li><li>| <a href="#v:NumberPrim">NumberPrim</a> !<a href="/usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a>  </li><li>| <a href="#v:BoolPrim">BoolPrim</a> !<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>  </li><li>| <a href="#v:NullPrim">NullPrim</a>  </li></ul></li><li class="src short"><span class="keyword">class</span> <a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> t =&gt; <a href="#t:AsPrimitive">AsPrimitive</a> t  <span class="keyword">where</span><ul class="subs"><li><a href="#v:_Primitive">_Primitive</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></li><li><a href="#v:_String">_String</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></li><li><a href="#v:_Bool">_Bool</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:_Null">_Null</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t ()</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="Data-Aeson-Lens.html#t:AsPrimitive">AsPrimitive</a> t =&gt; <a href="#t:AsValue">AsValue</a> t  <span class="keyword">where</span><ul class="subs"><li><a href="#v:_Value">_Value</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></li><li><a href="#v:_Object">_Object</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t (<a href="/usr/share/doc/libghc-unordered-containers-doc/html/Data-HashMap-Strict.html#t:HashMap">HashMap</a> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a>)</li><li><a href="#v:_Array">_Array</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t (<a href="/usr/share/doc/libghc-vector-doc/html/Data-Vector.html#t:Vector">Vector</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a>)</li></ul></li><li class="src short"><a href="#v:key">key</a> :: <a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> t =&gt; <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -&gt; <a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></li><li class="src short"><a href="#v:members">members</a> :: <a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> t =&gt; <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></li><li class="src short"><a href="#v:nth">nth</a> :: <a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> t =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></li><li class="src short"><a href="#v:values">values</a> :: <a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> t =&gt; <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></li><li class="src short"><span class="keyword">class</span>  <a href="#t:AsJSON">AsJSON</a> t  <span class="keyword">where</span><ul class="subs"><li><a href="#v:_JSON">_JSON</a> :: (<a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:FromJSON">FromJSON</a> a, <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:ToJSON">ToJSON</a> a) =&gt; <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t a</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Numbers
</h1><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:AsNumber" class="def">AsNumber</a> t  <span class="keyword">where</span><a href="src/Data-Aeson-Lens.html#AsNumber" class="link">Source</a></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_Number" class="def">_Number</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a><a href="src/Data-Aeson-Lens.html#_Number" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1, \&quot;x\&quot;]&quot; ^? nth 0 . _Number
</code></strong>Just 1.0
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1, \&quot;x\&quot;]&quot; ^? nth 1 . _Number
</code></strong>Nothing
</pre></div><p class="src"><a name="v:_Double" class="def">_Double</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a><a href="src/Data-Aeson-Lens.html#_Double" class="link">Source</a></p><div class="doc"><p>Prism into an <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a></code> over a <code><a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></code>, <code><a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></code> or <code><a href="/usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a></code>
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[10.2]&quot; ^? nth 0 . _Double
</code></strong>Just 10.2
</pre></div><p class="src"><a name="v:_Integer" class="def">_Integer</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a><a href="src/Data-Aeson-Lens.html#_Integer" class="link">Source</a></p><div class="doc"><p>Prism into an <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a></code> over a <code><a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></code>, <code><a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></code> or <code><a href="/usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a></code>
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[10]&quot; ^? nth 0 . _Integer
</code></strong>Just 10
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[10.5]&quot; ^? nth 0 . _Integer
</code></strong>Just 10
</pre></div></div><div class="subs instances"><p id="control.i:AsNumber" class="caption collapser" onclick="toggleSection('i:AsNumber')">Instances</p><div id="section.i:AsNumber" class="show"><table><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> <a href="/usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:_Integral" class="def">_Integral</a> :: (<a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> t, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a) =&gt; <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t a<a href="src/Data-Aeson-Lens.html#_Integral" class="link">Source</a></p><div class="doc"><p>Access Integer <code><a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></code>s as Integrals.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[10]&quot; ^? nth 0 . _Integral
</code></strong>Just 10
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[10.5]&quot; ^? nth 0 . _Integral
</code></strong>Just 10
</pre></div></div><div class="top"><p class="src"><a name="v:nonNull" class="def">nonNull</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a><a href="src/Data-Aeson-Lens.html#nonNull" class="link">Source</a></p><div class="doc"><p>Prism into non-<code><a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#v:Null">Null</a></code> values
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;{\&quot;a\&quot;: \&quot;xyz\&quot;, \&quot;b\&quot;: null}&quot; ^? key &quot;a&quot; . nonNull
</code></strong>Just (String &quot;xyz&quot;)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;{\&quot;a\&quot;: {}, \&quot;b\&quot;: null}&quot; ^? key &quot;a&quot; . nonNull
</code></strong>Just (Object (fromList []))
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;{\&quot;a\&quot;: \&quot;xyz\&quot;, \&quot;b\&quot;: null}&quot; ^? key &quot;b&quot; . nonNull
</code></strong>Nothing
</pre></div></div><h1 id="g:2">Primitive
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Primitive" class="def">Primitive</a>  <a href="src/Data-Aeson-Lens.html#Primitive" class="link">Source</a></p><div class="doc"><p>Primitives of <code><a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></code>
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:StringPrim" class="def">StringPrim</a> !<a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:NumberPrim" class="def">NumberPrim</a> !<a href="/usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:BoolPrim" class="def">BoolPrim</a> !<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:NullPrim" class="def">NullPrim</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Primitive" class="caption collapser" onclick="toggleSection('i:Primitive')">Instances</p><div id="section.i:Primitive" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Data.html#t:Data">Data</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsPrimitive">AsPrimitive</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Data-Aeson-Lens.html#t:AsNumber">AsNumber</a> t =&gt; <a name="t:AsPrimitive" class="def">AsPrimitive</a> t  <span class="keyword">where</span><a href="src/Data-Aeson-Lens.html#AsPrimitive" class="link">Source</a></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_Primitive" class="def">_Primitive</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a><a href="src/Data-Aeson-Lens.html#_Primitive" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1, \&quot;x\&quot;, null, true, false]&quot; ^? nth 0 . _Primitive
</code></strong>Just (NumberPrim 1.0)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1, \&quot;x\&quot;, null, true, false]&quot; ^? nth 1 . _Primitive
</code></strong>Just (StringPrim &quot;x&quot;)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1, \&quot;x\&quot;, null, true, false]&quot; ^? nth 2 . _Primitive
</code></strong>Just NullPrim
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1, \&quot;x\&quot;, null, true, false]&quot; ^? nth 3 . _Primitive
</code></strong>Just (BoolPrim True)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1, \&quot;x\&quot;, null, true, false]&quot; ^? nth 4 . _Primitive
</code></strong>Just (BoolPrim False)
</pre></div><p class="src"><a name="v:_String" class="def">_String</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a><a href="src/Data-Aeson-Lens.html#_String" class="link">Source</a></p><p class="src"><a name="v:_Bool" class="def">_Bool</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Aeson-Lens.html#_Bool" class="link">Source</a></p><p class="src"><a name="v:_Null" class="def">_Null</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t ()<a href="src/Data-Aeson-Lens.html#_Null" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:AsPrimitive" class="caption collapser" onclick="toggleSection('i:AsPrimitive')">Instances</p><div id="section.i:AsPrimitive" class="show"><table><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsPrimitive">AsPrimitive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsPrimitive">AsPrimitive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsPrimitive">AsPrimitive</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsPrimitive">AsPrimitive</a> <a href="Data-Aeson-Lens.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:3">Objects and Arrays
</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="Data-Aeson-Lens.html#t:AsPrimitive">AsPrimitive</a> t =&gt; <a name="t:AsValue" class="def">AsValue</a> t  <span class="keyword">where</span><a href="src/Data-Aeson-Lens.html#AsValue" class="link">Source</a></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_Value" class="def">_Value</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a><a href="src/Data-Aeson-Lens.html#_Value" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1,2,3]&quot; ^? _Value
</code></strong>Just (Array (fromList [Number 1.0,Number 2.0,Number 3.0]))
</pre></div><p class="src"><a name="v:_Object" class="def">_Object</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t (<a href="/usr/share/doc/libghc-unordered-containers-doc/html/Data-HashMap-Strict.html#t:HashMap">HashMap</a> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a>)<a href="src/Data-Aeson-Lens.html#_Object" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;{\&quot;a\&quot;: {}, \&quot;b\&quot;: null}&quot; ^? key &quot;a&quot; . _Object
</code></strong>Just (fromList [])
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;{\&quot;a\&quot;: {}, \&quot;b\&quot;: null}&quot; ^? key &quot;b&quot; . _Object
</code></strong>Nothing
</pre></div><p class="src"><a name="v:_Array" class="def">_Array</a> :: <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t (<a href="/usr/share/doc/libghc-vector-doc/html/Data-Vector.html#t:Vector">Vector</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a>)<a href="src/Data-Aeson-Lens.html#_Array" class="link">Source</a></p><div class="doc"><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1,2,3]&quot; ^? _Array
</code></strong>Just (fromList [Number 1.0,Number 2.0,Number 3.0])
</pre></div></div><div class="subs instances"><p id="control.i:AsValue" class="caption collapser" onclick="toggleSection('i:AsValue')">Instances</p><div id="section.i:AsValue" class="show"><table><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:key" class="def">key</a> :: <a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> t =&gt; <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> -&gt; <a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a><a href="src/Data-Aeson-Lens.html#key" class="link">Source</a></p><div class="doc"><p>Like <code><a href="Control-Lens-At.html#v:ix">ix</a></code>, but for <code><a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Object">Object</a></code> with Text indices. This often has better
 inference than <code><a href="Control-Lens-At.html#v:ix">ix</a></code> when used with OverloadedStrings.
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;{\&quot;a\&quot;: 100, \&quot;b\&quot;: 200}&quot; ^? key &quot;a&quot;
</code></strong>Just (Number 100.0)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1,2,3]&quot; ^? key &quot;a&quot;
</code></strong>Nothing
</pre></div></div><div class="top"><p class="src"><a name="v:members" class="def">members</a> :: <a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> t =&gt; <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Internal.html#t:Text">Text</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a><a href="src/Data-Aeson-Lens.html#members" class="link">Source</a></p><div class="doc"><p>An indexed Traversal into Object properties
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;{\&quot;a\&quot;: 4, \&quot;b\&quot;: 7}&quot; ^@.. members
</code></strong>[(&quot;a&quot;,Number 4.0),(&quot;b&quot;,Number 7.0)]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;{\&quot;a\&quot;: 4, \&quot;b\&quot;: 7}&quot; &amp; members . _Number *~ 10
</code></strong>&quot;{\&quot;a\&quot;:40,\&quot;b\&quot;:70}&quot;
</pre></div></div><div class="top"><p class="src"><a name="v:nth" class="def">nth</a> :: <a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> t =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Lens-Type.html#t:Traversal-39-">Traversal'</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a><a href="src/Data-Aeson-Lens.html#nth" class="link">Source</a></p><div class="doc"><p>Like <code><a href="Control-Lens-At.html#v:ix">ix</a></code>, but for Arrays with Int indexes
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1,2,3]&quot; ^? nth 1
</code></strong>Just (Number 2.0)
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;\&quot;a\&quot;: 100, \&quot;b\&quot;: 200}&quot; ^? nth 1
</code></strong>Nothing
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1,2,3]&quot; &amp; nth 1 .~ Number 20
</code></strong>&quot;[1,20,3]&quot;
</pre></div></div><div class="top"><p class="src"><a name="v:values" class="def">values</a> :: <a href="Data-Aeson-Lens.html#t:AsValue">AsValue</a> t =&gt; <a href="Control-Lens-Type.html#t:IndexedTraversal-39-">IndexedTraversal'</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> t <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a><a href="src/Data-Aeson-Lens.html#values" class="link">Source</a></p><div class="doc"><p>An indexed Traversal into Array elements
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1,2,3]&quot; ^.. values
</code></strong>[Number 1.0,Number 2.0,Number 3.0]
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>&quot;[1,2,3]&quot; &amp; values . _Number *~ 10
</code></strong>&quot;[10,20,30]&quot;
</pre></div></div><h1 id="g:4">Decoding
</h1><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:AsJSON" class="def">AsJSON</a> t  <span class="keyword">where</span><a href="src/Data-Aeson-Lens.html#AsJSON" class="link">Source</a></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_JSON" class="def">_JSON</a> :: (<a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:FromJSON">FromJSON</a> a, <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:ToJSON">ToJSON</a> a) =&gt; <a href="Control-Lens-Type.html#t:Prism-39-">Prism'</a> t a<a href="src/Data-Aeson-Lens.html#_JSON" class="link">Source</a></p><div class="doc"><p>A Prism into <code><a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></code> on lazy <code><a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code>s.
</p></div></div><div class="subs instances"><p id="control.i:AsJSON" class="caption collapser" onclick="toggleSection('i:AsJSON')">Instances</p><div id="section.i:AsJSON" class="show"><table><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsJSON">AsJSON</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsJSON">AsJSON</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Aeson-Lens.html#t:AsJSON">AsJSON</a> <a href="/usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:Value">Value</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>