Skip to content

Commit

Permalink
deploy: 0afa1d2
Browse files Browse the repository at this point in the history
  • Loading branch information
satabin committed Oct 15, 2024
1 parent 931c7d8 commit 89084b0
Show file tree
Hide file tree
Showing 28 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 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>
<li class="level2 nav-leaf"><a href="../jsonlines/">Handling JSON Lines 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@15639f14
</span><span class="comment">// queryCompiler: Compiler[IO] = fs2.data.json.jq.internal.ESPJqCompiler@657730f8
</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 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>
<li class="level2 active nav-leaf"><a href="#">Handling JSON Lines 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/jsonlines/">Handling JSON Lines data</a></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>
</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@7866422f,
// at = scodec.bits.ByteVector$AtArray@1eaf687a,
// 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@620582b7,
// at = scodec.bits.ByteVector$AtArray@3d205d41,
// 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/jsonlines/">Handling JSON Lines data</a></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>
</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@51a5c439,
// at = scodec.bits.ByteVector$AtArray@3c5f0afc,
// 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@7510ad6d,
// at = scodec.bits.ByteVector$AtArray@2d02cef2,
// 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@361668b1,
// at = scodec.bits.ByteVector$AtArray@58b287aa,
// 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@10cd9a11,
// at = scodec.bits.ByteVector$AtArray@279d09f6,
// 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@6f36103d,
// at = scodec.bits.ByteVector$AtArray@63d1ef13,
// 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@488f8086,
// at = scodec.bits.ByteVector$AtArray@1946185e,
// 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@2c7448a,
// at = scodec.bits.ByteVector$AtArray@3f07f06,
// 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@4e3a6fe1,
// at = scodec.bits.ByteVector$AtArray@755e599,
// 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@3f9a8651,
// at = scodec.bits.ByteVector$AtArray@64a9a7f2,
// 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@ba5aa94,
// at = scodec.bits.ByteVector$AtArray@4d04c7d1,
// 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@4565db0c,
// at = scodec.bits.ByteVector$AtArray@4ce26953,
// 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@63b2383e,
// at = scodec.bits.ByteVector$AtArray@27b31551,
// 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@22ee959a,
// at = scodec.bits.ByteVector$AtArray@edf9dd6,
// 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@3f913310,
// at = scodec.bits.ByteVector$AtArray@528dc1c,
// 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@54c73255,
// at = scodec.bits.ByteVector$AtArray@5adf851b,
// 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/jsonlines/">Handling JSON Lines data</a></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>
</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@217a0ca3
</span><span class="comment">// stateDecoder: CellDecoder[State] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@3d00752a
// 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@4e12cdce
</span><span class="comment">// stateEncoder: CellEncoder[State] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@3b71b879
</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@666083b8
</span><span class="comment">// unknownDecoder: CellDecoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$unaryProductDecoder$3@5b05feff
</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@72fe0058
</span><span class="comment">// advancedDecoder: CellDecoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellDecoder$$anonfun$coproductDecoder$3@c7fa45d
</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@641e213f
</span><span class="comment">// unknownEncoder: CellEncoder[Advanced.Unknown] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$unaryProductEncoder$3@1e4c4e9a
</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@238f44b2
</span><span class="comment">// advancedEncoder: CellEncoder[Advanced] = fs2.data.csv.generic.internal.DerivedCellEncoder$$anonfun$coproductEncoder$3@d8a7402
</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@2660fe0d
</span><span class="comment">// MyRowDecoder: CsvRowDecoder[MyRow, String] = fs2.data.csv.generic.internal.DerivedCsvRowDecoder$$anon$1@5c124346
</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 89084b0

Please sign in to comment.