Skip to content

Commit

Permalink
deploy: cadb26b
Browse files Browse the repository at this point in the history
  • Loading branch information
satabin committed Oct 21, 2024
1 parent 89084b0 commit f7a23f7
Show file tree
Hide file tree
Showing 27 changed files with 49 additions and 49 deletions.
4 changes: 2 additions & 2 deletions cookbooks/jq/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
<li class="level2 nav-header">cbor-json</li>
<li class="level3 nav-leaf"><a href="../../documentation/cbor-json/">Introduction</a></li>
<li class="level1 nav-header">cookbooks</li>
<li class="level2 active nav-leaf"><a href="#">Reading/transforming/writing JSON data</a></li>
<li class="level2 nav-leaf"><a href="../jsonlines/">Handling JSON Lines data</a></li>
<li class="level2 active nav-leaf"><a href="#">Reading/transforming/writing JSON data</a></li>
</ul>

<ul class="nav-list">
Expand Down Expand Up @@ -256,7 +256,7 @@ <h3 id="transforming" class="section"><a class="anchor-link left" href="#transfo
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="keyword">import</span><span> </span><span class="identifier">fs2</span><span>.</span><span class="identifier">data</span><span>.</span><span class="identifier">json</span><span>.</span><span class="identifier">jq</span><span>.</span><span class="type-name">Compiler</span><span>

</span><span class="keyword">val</span><span> </span><span class="identifier">queryCompiler</span><span> = </span><span class="type-name">Compiler</span><span>[</span><span class="type-name">IO</span><span>]
</span><span class="comment">// queryCompiler: Compiler[IO] = fs2.data.json.jq.internal.ESPJqCompiler@657730f8
</span><span class="comment">// queryCompiler: Compiler[IO] = fs2.data.json.jq.internal.ESPJqCompiler@25708dd4
</span><span>
</span><span class="keyword">val</span><span> </span><span class="identifier">queryPipe</span><span> = </span><span class="identifier">queryCompiler</span><span>.</span><span class="identifier">compile</span><span>(</span><span class="identifier">query</span><span>).</span><span class="identifier">unsafeRunSync</span><span>()
</span><span class="comment">// queryPipe: fs2.package.Pipe[IO, json.Token, json.Token] = &lt;function1&gt;</span></code></pre>
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/jsonlines/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
<li class="level2 nav-header">cbor-json</li>
<li class="level3 nav-leaf"><a href="../../documentation/cbor-json/">Introduction</a></li>
<li class="level1 nav-header">cookbooks</li>
<li class="level2 nav-leaf"><a href="../jq/">Reading/transforming/writing JSON data</a></li>
<li class="level2 active nav-leaf"><a href="#">Handling JSON Lines data</a></li>
<li class="level2 nav-leaf"><a href="../jq/">Reading/transforming/writing JSON data</a></li>
</ul>

<ul class="nav-list">
Expand Down
6 changes: 3 additions & 3 deletions documentation/cbor-json/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
<li class="level2 nav-header">cbor-json</li>
<li class="level3 active nav-leaf"><a href="#">Introduction</a></li>
<li class="level1 nav-header">cookbooks</li>
<li class="level2 nav-leaf"><a href="../../cookbooks/jq/">Reading/transforming/writing JSON data</a></li>
<li class="level2 nav-leaf"><a href="../../cookbooks/jsonlines/">Handling JSON Lines data</a></li>
<li class="level2 nav-leaf"><a href="../../cookbooks/jq/">Reading/transforming/writing JSON data</a></li>
</ul>

<ul class="nav-list">
Expand Down Expand Up @@ -264,7 +264,7 @@ <h2 id="json-to-cbor" class="section"><a class="anchor-link left" href="#json-to
// NegativeInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@1eaf687a,
// at = scodec.bits.ByteVector$AtArray@5db4da3e,
// offset = 0L,
// size = 1L
// )
Expand All @@ -273,7 +273,7 @@ <h2 id="json-to-cbor" class="section"><a class="anchor-link left" href="#json-to
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@3d205d41,
// at = scodec.bits.ByteVector$AtArray@286c4ae4,
// offset = 0L,
// size = 2L
// )
Expand Down
32 changes: 16 additions & 16 deletions documentation/cbor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
<li class="level2 nav-header">cbor-json</li>
<li class="level3 nav-leaf"><a href="../cbor-json/">Introduction</a></li>
<li class="level1 nav-header">cookbooks</li>
<li class="level2 nav-leaf"><a href="../../cookbooks/jq/">Reading/transforming/writing JSON data</a></li>
<li class="level2 nav-leaf"><a href="../../cookbooks/jsonlines/">Handling JSON Lines data</a></li>
<li class="level2 nav-leaf"><a href="../../cookbooks/jq/">Reading/transforming/writing JSON data</a></li>
</ul>

<ul class="nav-list">
Expand Down Expand Up @@ -187,7 +187,7 @@ <h3 id="parsing-1" class="section"><a class="anchor-link left" href="#parsing-1"
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@3c5f0afc,
// at = scodec.bits.ByteVector$AtArray@50181682,
// offset = 0L,
// size = 1L
// )
Expand All @@ -197,7 +197,7 @@ <h3 id="parsing-1" class="section"><a class="anchor-link left" href="#parsing-1"
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@2d02cef2,
// at = scodec.bits.ByteVector$AtArray@44db2f4f,
// offset = 0L,
// size = 1L
// )
Expand All @@ -206,7 +206,7 @@ <h3 id="parsing-1" class="section"><a class="anchor-link left" href="#parsing-1"
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@58b287aa,
// at = scodec.bits.ByteVector$AtArray@2c1e9919,
// offset = 0L,
// size = 1L
// )
Expand All @@ -216,7 +216,7 @@ <h3 id="parsing-1" class="section"><a class="anchor-link left" href="#parsing-1"
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@279d09f6,
// at = scodec.bits.ByteVector$AtArray@5dda6f74,
// offset = 0L,
// size = 1L
// )
Expand All @@ -225,7 +225,7 @@ <h3 id="parsing-1" class="section"><a class="anchor-link left" href="#parsing-1"
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@63d1ef13,
// at = scodec.bits.ByteVector$AtArray@4d66ce4b,
// offset = 0L,
// size = 1L
// )
Expand Down Expand Up @@ -340,7 +340,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@1946185e,
// at = scodec.bits.ByteVector$AtArray@1f687cf7,
// offset = 0L,
// size = 1L
// )
Expand All @@ -350,7 +350,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@3f07f06,
// at = scodec.bits.ByteVector$AtArray@110263c,
// offset = 0L,
// size = 1L
// )
Expand All @@ -359,7 +359,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@755e599,
// at = scodec.bits.ByteVector$AtArray@e23505b,
// offset = 0L,
// size = 1L
// )
Expand All @@ -369,7 +369,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@64a9a7f2,
// at = scodec.bits.ByteVector$AtArray@23a1fa0c,
// offset = 0L,
// size = 1L
// )
Expand All @@ -378,7 +378,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@4d04c7d1,
// at = scodec.bits.ByteVector$AtArray@7ff2a54b,
// offset = 0L,
// size = 1L
// )
Expand All @@ -400,7 +400,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@4ce26953,
// at = scodec.bits.ByteVector$AtArray@47bb8d9c,
// offset = 0L,
// size = 1L
// )
Expand All @@ -410,7 +410,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@27b31551,
// at = scodec.bits.ByteVector$AtArray@2d89b0dd,
// offset = 0L,
// size = 1L
// )
Expand All @@ -419,7 +419,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@edf9dd6,
// at = scodec.bits.ByteVector$AtArray@48d53916,
// offset = 0L,
// size = 1L
// )
Expand All @@ -429,7 +429,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@528dc1c,
// at = scodec.bits.ByteVector$AtArray@10b04631,
// offset = 0L,
// size = 1L
// )
Expand All @@ -438,7 +438,7 @@ <h3 id="serializing-2" class="section"><a class="anchor-link left" href="#serial
// PositiveInt(
// bytes = Chunk(
// bytes = View(
// at = scodec.bits.ByteVector$AtArray@5adf851b,
// at = scodec.bits.ByteVector$AtArray@b7ceed6,
// offset = 0L,
// size = 1L
// )
Expand Down
16 changes: 8 additions & 8 deletions documentation/csv/generic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
<li class="level2 nav-header">cbor-json</li>
<li class="level3 nav-leaf"><a href="../../cbor-json/">Introduction</a></li>
<li class="level1 nav-header">cookbooks</li>
<li class="level2 nav-leaf"><a href="../../../cookbooks/jq/">Reading/transforming/writing JSON data</a></li>
<li class="level2 nav-leaf"><a href="../../../cookbooks/jsonlines/">Handling JSON Lines data</a></li>
<li class="level2 nav-leaf"><a href="../../../cookbooks/jq/">Reading/transforming/writing JSON data</a></li>
</ul>

<ul class="nav-list">
Expand Down Expand Up @@ -190,7 +190,7 @@ <h2 id="derivation-of-celldecoder-cellencoder" class="section"><a class="anchor-
}

</span><span class="keyword">implicit</span><span> </span><span class="keyword">val</span><span> </span><span class="identifier">stateDecoder</span><span> = </span><span class="identifier">deriveCellDecoder</span><span>[</span><span class="type-name">State</span><span>]
</span><span class="comment">// stateDecoder: CellDecoder[State] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@3d00752a
</span><span class="comment">// stateDecoder: CellDecoder[State] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@3a229b58
// use stateDecoder to derive decoders for rows...or just test:
</span><span class="identifier">stateDecoder</span><span>(</span><span class="string-literal">&quot;On&quot;</span><span>)
</span><span class="comment">// res1: DecoderResult[State] = Right(value = On)
Expand All @@ -199,7 +199,7 @@ <h2 id="derivation-of-celldecoder-cellencoder" class="section"><a class="anchor-
</span><span>
</span><span class="comment">// same goes for the encoder
</span><span class="keyword">implicit</span><span> </span><span class="keyword">val</span><span> </span><span class="identifier">stateEncoder</span><span> = </span><span class="identifier">deriveCellEncoder</span><span>[</span><span class="type-name">State</span><span>]
</span><span class="comment">// stateEncoder: CellEncoder[State] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@3b71b879
</span><span class="comment">// stateEncoder: CellEncoder[State] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@6ec5c02a
</span><span class="identifier">stateEncoder</span><span>(</span><span class="type-name">State</span><span>.</span><span class="type-name">On</span><span>)
</span><span class="comment">// res3: String = &quot;On&quot;</span></code></pre>
<p>The generic derivation for cell decoders also supports renaming and deriving instances for unary product types (case classes with one field):</p>
Expand All @@ -213,19 +213,19 @@ <h2 id="derivation-of-celldecoder-cellencoder" class="section"><a class="anchor-

</span><span class="comment">// works as we have an implicit CellDecoder[String]
</span><span class="keyword">implicit</span><span> </span><span class="keyword">val</span><span> </span><span class="identifier">unknownDecoder</span><span> = </span><span class="identifier">deriveCellDecoder</span><span>[</span><span class="type-name">Advanced</span><span>.</span><span class="type-name">Unknown</span><span>]
</span><span class="comment">// unknownDecoder: CellDecoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$unaryProductDecoder$3@5b05feff
</span><span class="comment">// unknownDecoder: CellDecoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$unaryProductDecoder$3@792f8145
</span><span class="keyword">implicit</span><span> </span><span class="keyword">val</span><span> </span><span class="identifier">advancedDecoder</span><span> = </span><span class="identifier">deriveCellDecoder</span><span>[</span><span class="type-name">Advanced</span><span>]
</span><span class="comment">// advancedDecoder: CellDecoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@c7fa45d
</span><span class="comment">// advancedDecoder: CellDecoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@2e82b43d
</span><span>
</span><span class="identifier">advancedDecoder</span><span>(</span><span class="string-literal">&quot;Active&quot;</span><span>)
</span><span class="comment">// res4: DecoderResult[Advanced] = Right(value = On)
</span><span class="identifier">advancedDecoder</span><span>(</span><span class="string-literal">&quot;Off&quot;</span><span>)
</span><span class="comment">// res5: DecoderResult[Advanced] = Right(value = Unknown(name = &quot;Off&quot;))
</span><span>
</span><span class="keyword">implicit</span><span> </span><span class="keyword">val</span><span> </span><span class="identifier">unknownEncoder</span><span> = </span><span class="identifier">deriveCellEncoder</span><span>[</span><span class="type-name">Advanced</span><span>.</span><span class="type-name">Unknown</span><span>]
</span><span class="comment">// unknownEncoder: CellEncoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$unaryProductEncoder$3@1e4c4e9a
</span><span class="comment">// unknownEncoder: CellEncoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$unaryProductEncoder$3@3a384a31
</span><span class="keyword">implicit</span><span> </span><span class="keyword">val</span><span> </span><span class="identifier">advancedEncoder</span><span> = </span><span class="identifier">deriveCellEncoder</span><span>[</span><span class="type-name">Advanced</span><span>]
</span><span class="comment">// advancedEncoder: CellEncoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@d8a7402
</span><span class="comment">// advancedEncoder: CellEncoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@17ee1515
</span><span>
</span><span class="identifier">advancedEncoder</span><span>(</span><span class="type-name">Advanced</span><span>.</span><span class="type-name">On</span><span>)
</span><span class="comment">// res6: String = &quot;Active&quot;
Expand Down Expand Up @@ -269,7 +269,7 @@ <h2 id="derivation-of-csvrowdecoder" class="section"><a class="anchor-link left"
<pre><code class="nohighlight"><span class="keyword">import</span><span> </span><span class="identifier">fs2</span><span>.</span><span class="identifier">data</span><span>.</span><span class="identifier">csv</span><span>.</span><span class="identifier">generic</span><span>.</span><span class="identifier">semiauto</span><span>.</span><span class="identifier">_</span><span>

</span><span class="keyword">implicit</span><span> </span><span class="keyword">val</span><span> </span><span class="type-name">MyRowDecoder</span><span>: </span><span class="type-name">CsvRowDecoder</span><span>[</span><span class="type-name">MyRow</span><span>, </span><span class="type-name">String</span><span>] = </span><span class="identifier">deriveCsvRowDecoder</span><span>[</span><span class="type-name">MyRow</span><span>]
</span><span class="comment">// MyRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@5c124346
</span><span class="comment">// MyRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@6352e406
</span><span>
</span><span class="keyword">val</span><span> </span><span class="identifier">decoded</span><span> = </span><span class="identifier">stream</span><span>.</span><span class="identifier">through</span><span>(</span><span class="identifier">decodeUsingHeaders</span><span>[</span><span class="type-name">MyRow</span><span>]())
</span><span class="comment">// decoded: Stream[[x]Fallible[x], MyRow] = Stream(..)
Expand Down
Loading

0 comments on commit f7a23f7

Please sign in to comment.