@zio.dev/zio-blocks 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/guides/compile-time-resource-safety-with-scope.md +997 -0
  2. package/guides/query-dsl-extending.md +1 -1
  3. package/guides/query-dsl-fluent-builder.md +203 -203
  4. package/guides/query-dsl-reified-optics.md +1 -1
  5. package/guides/query-dsl-sql.md +1 -1
  6. package/guides/zio-schema-migration.md +6 -6
  7. package/index.md +68 -16
  8. package/package.json +1 -1
  9. package/path-interpolator.md +70 -9
  10. package/reference/allows.md +96 -0
  11. package/reference/codec.md +8 -8
  12. package/reference/combinators.md +345 -0
  13. package/reference/context.md +639 -67
  14. package/reference/docs.md +1 -1
  15. package/reference/dynamic-schema.md +39 -42
  16. package/reference/http-model.md +1716 -0
  17. package/reference/json-differ.md +320 -0
  18. package/reference/json-patch.md +1 -1
  19. package/reference/media-type.md +2 -2
  20. package/reference/resource-management/defer-handle.md +246 -0
  21. package/reference/resource-management/finalization.md +286 -0
  22. package/reference/resource-management/finalizer.md +167 -0
  23. package/reference/resource-management/index.md +44 -0
  24. package/reference/resource-management/resource.md +1607 -0
  25. package/reference/resource-management/scope.md +3026 -0
  26. package/reference/resource-management/unscoped.md +125 -0
  27. package/reference/resource-management/wire.md +878 -0
  28. package/reference/schema-evolution/as.md +4 -4
  29. package/reference/schema-evolution/into.md +2 -2
  30. package/reference/schema-expr.md +2 -2
  31. package/reference/streams.md +989 -0
  32. package/reference/type-class-derivation.md +31 -31
  33. package/ringbuffer.md +249 -0
  34. package/sidebars.js +19 -2
  35. package/scope.md +0 -1423
package/index.md CHANGED
@@ -24,6 +24,7 @@ The philosophy is simple: **use what you need, nothing more**. Each block is ind
24
24
  | **TypeId** | Compile-time type identity with rich metadata | ✅ Available |
25
25
  | **Context** | Type-indexed heterogeneous collections | ✅ Available |
26
26
  | **MediaType** | Type-safe IANA media types with 2,600+ predefined types | ✅ Available |
27
+ | **Ring Buffer** | High-performance bounded ring buffers (SPSC, MPSC, SPMC, MPMC) | ✅ Available |
27
28
  | **Streams** | Pull-based streaming primitives | 🚧 In Development |
28
29
 
29
30
  ## Core Principles
@@ -81,14 +82,14 @@ val thriftCodec = Schema[Person].derive(ThriftFormat) // Thrift
81
82
  ### Installation
82
83
 
83
84
  ```scala
84
- libraryDependencies += "dev.zio" %% "zio-blocks-schema" % "0.0.28"
85
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema" % "0.0.30"
85
86
 
86
87
  // Optional format modules:
87
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-avro" % "0.0.28"
88
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-toon" % "0.0.28"
89
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-messagepack" % "0.0.28"
90
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-thrift" % "0.0.28"
91
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-bson" % "0.0.28"
88
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-avro" % "0.0.30"
89
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-toon" % "0.0.30"
90
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-messagepack" % "0.0.30"
91
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-thrift" % "0.0.30"
92
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-bson" % "0.0.30"
92
93
  ```
93
94
 
94
95
  ### Example: Optics
@@ -143,7 +144,7 @@ Chunk is designed for:
143
144
  ### Installation
144
145
 
145
146
  ```scala
146
- libraryDependencies += "dev.zio" %% "zio-blocks-chunk" % "0.0.28"
147
+ libraryDependencies += "dev.zio" %% "zio-blocks-chunk" % "0.0.30"
147
148
  ```
148
149
 
149
150
  ### Example
@@ -232,7 +233,7 @@ Scope.global.scoped { scope =>
232
233
  ### Installation
233
234
 
234
235
  ```scala
235
- libraryDependencies += "dev.zio" %% "zio-blocks-scope" % "0.0.28"
236
+ libraryDependencies += "dev.zio" %% "zio-blocks-scope" % "0.0.30"
236
237
  ```
237
238
 
238
239
  ### Example: Basic Resource Management
@@ -309,6 +310,12 @@ Scope.global.scoped { connScope =>
309
310
  // Connection closed here
310
311
  ```
311
312
 
313
+ ### Getting Started
314
+
315
+ New to Scope? Check out the [Scope Tutorial](./guides/compile-time-resource-safety-with-scope.md) for a comprehensive step-by-step guide that walks you through the concepts, patterns, and real-world examples. The tutorial is designed for newcomers and covers everything from basic resource management to advanced dependency injection.
316
+
317
+ For detailed API documentation, see the [Scope Reference](./reference/resource-management/scope.md).
318
+
312
319
  ---
313
320
 
314
321
  ## Docs
@@ -335,7 +342,7 @@ Generating documentation, README files, or any Markdown content programmatically
335
342
  ### Installation
336
343
 
337
344
  ```scala
338
- libraryDependencies += "dev.zio" %% "zio-blocks-docs" % "0.0.28"
345
+ libraryDependencies += "dev.zio" %% "zio-blocks-docs" % "0.0.30"
339
346
  ```
340
347
 
341
348
  ### Example
@@ -419,7 +426,7 @@ Compile-time type identity with rich metadata. TypeId captures comprehensive inf
419
426
  ### Installation
420
427
 
421
428
  ```scala
422
- libraryDependencies += "dev.zio" %% "zio-blocks-typeid" % "0.0.28"
429
+ libraryDependencies += "dev.zio" %% "zio-blocks-typeid" % "0.0.30"
423
430
  ```
424
431
 
425
432
  ### Example
@@ -462,7 +469,7 @@ A type-indexed heterogeneous collection that stores values by their types with c
462
469
  ### Installation
463
470
 
464
471
  ```scala
465
- libraryDependencies += "dev.zio" %% "zio-blocks-context" % "0.0.28"
472
+ libraryDependencies += "dev.zio" %% "zio-blocks-context" % "0.0.30"
466
473
  ```
467
474
 
468
475
  ### Example
@@ -494,6 +501,47 @@ val merged: Context[Config & Metrics] = ctx1 ++ ctx2
494
501
 
495
502
  ---
496
503
 
504
+ ## Ring Buffer
505
+
506
+ High-performance, bounded ring buffers for inter-thread communication. Four lock-free variants cover every producer/consumer pattern (SPSC, MPSC, SPMC, MPMC).
507
+
508
+ ### Why Ring Buffer?
509
+
510
+ Standard `java.util.concurrent` queues use node allocation (`ConcurrentLinkedQueue`) or coarse locking (`ArrayBlockingQueue`). Ring buffers avoid both:
511
+
512
+ - **Zero allocation** on the hot path—pre-allocated circular array
513
+ - **Lock-free** on the fast path—CAS or release/acquire semantics only
514
+ - **Cache-friendly**—sequential memory access with 128-byte padding between producer/consumer fields
515
+
516
+ ### Key Features
517
+
518
+ - **Four concurrency patterns**: SPSC, SPMC, MPSC, MPMC—pick the most constrained variant for your use case
519
+ - **Cross-platform**: Same API on JVM and Scala.js (JS uses sequential implementations)
520
+
521
+ ### Installation
522
+
523
+ ```scala
524
+ libraryDependencies += "dev.zio" %% "zio-blocks-ringbuffer" % "0.0.30"
525
+ ```
526
+
527
+ ### Example
528
+
529
+ ```scala
530
+ import zio.blocks.ringbuffer._
531
+
532
+ // SPSC: fastest, for dedicated producer-consumer pairs
533
+ val spsc = SpscRingBuffer[String](1024)
534
+ spsc.offer("hello") // true
535
+ spsc.take() // "hello"
536
+
537
+ // MPMC: general-purpose, any number of threads
538
+ val mpmc = MpmcRingBuffer[String](1024)
539
+ mpmc.offer("hello") // false if full
540
+ mpmc.take() // null if empty
541
+ ```
542
+
543
+ ---
544
+
497
545
  ## Streams (In Development)
498
546
 
499
547
  A pull-based streaming library for composable, backpressure-aware data processing.
@@ -526,10 +574,10 @@ Each block has zero dependencies on effect systems. Use the blocks directly, or
526
574
 
527
575
  ZIO Blocks supports **Scala 2.13** and **Scala 3.x** with full source compatibility. Write your code once and compile it against either version—migrate to Scala 3 when your team is ready, not when your dependencies force you.
528
576
 
529
- | Platform | Schema | Chunk | Scope | Docs | TypeId | Context | Streams |
530
- |----------|--------|-------|-------|------|--------|---------|---------|
531
- | JVM | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
532
- | Scala.js | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
577
+ | Platform | Schema | Chunk | Scope | Docs | TypeId | Context | Ring Buffer | Streams |
578
+ |----------|--------|-------|-------|------|--------|---------|-------------|---------|
579
+ | JVM | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
580
+ | Scala.js | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
533
581
 
534
582
  ## Documentation
535
583
 
@@ -555,6 +603,7 @@ ZIO Blocks supports **Scala 2.13** and **Scala 3.x** with full source compatibil
555
603
  - [Codec & Format](./reference/codec.md) - Codec, Format, BinaryCodec & TextCodec
556
604
  - [JSON](./reference/json.md) - JSON codec and parsing
557
605
  - [JsonPatch](./reference/json-patch.md) - Diff and patch JSON values
606
+ - [JsonDiffer](./reference/json-differ.md) - Compute minimal diffs between JSON values
558
607
  - [JSON Schema](./reference/json-schema.md) - JSON Schema generation and validation
559
608
  - [Formats](./reference/formats.md) - Avro, TOON, MessagePack, BSON, Thrift
560
609
  - [Extension Syntax](./reference/syntax.md) - `.toJson`, `.fromJson`, and more
@@ -571,11 +620,14 @@ ZIO Blocks supports **Scala 2.13** and **Scala 3.x** with full source compatibil
571
620
  ### Other Blocks
572
621
 
573
622
  - [Chunk](./reference/chunk.md) - High-performance immutable sequences
574
- - [Scope](./scope.md) - Compile-time safe resource management and DI
623
+ - [Scope](./reference/resource-management/scope.md) - Compile-time safe resource management and DI
624
+ - [Wire](./reference/resource-management/wire.md) - Recipes for constructing services and dependencies
575
625
  - [TypeId](./reference/typeid.md) - Type identity and metadata
576
626
  - [Context](./reference/context.md) - Type-indexed heterogeneous collections
577
627
  - [Docs (Markdown)](./reference/docs.md) - Markdown parsing and rendering
578
628
  - [MediaType](./reference/media-type.md) - Type-safe IANA media types
629
+ - [HTTP Model](./reference/http-model.md) - Pure HTTP data model with URL parsing, headers, cookies, and forms
630
+ - [Ring Buffer](./ringbuffer.md) - High-performance bounded ring buffers
579
631
 
580
632
  ### Guides
581
633
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@zio.dev/zio-blocks",
3
3
  "description": "ZIO Blocks Documentation",
4
4
  "license": "Apache-2.0",
5
- "version": "0.0.28",
5
+ "version": "0.0.30",
6
6
  "repository": {
7
7
  "url": "https://github.com/zio/zio-blocks"
8
8
  }
@@ -212,6 +212,65 @@ p"<café>" // Unicode case names
212
212
  p"<A><B><C>" // Nested variants
213
213
  ```
214
214
 
215
+ ### Schema Search
216
+
217
+ Search for values matching a schema pattern anywhere in a data structure using the `#` prefix.
218
+
219
+ **Nominal types:**
220
+
221
+ ```scala
222
+ p"#Person" // Find all values of type Person
223
+ p"#User" // Find all values of type User
224
+ p"#Address" // Find all values of type Address
225
+ ```
226
+
227
+ **Primitive types:**
228
+
229
+ ```scala
230
+ p"#string" // Find all string values
231
+ p"#int" // Find all integer values
232
+ p"#boolean" // Find all boolean values
233
+ p"#uuid" // Find all UUID values
234
+ ```
235
+
236
+ **Structural records:**
237
+
238
+ ```scala
239
+ p"#record { name: string }" // Find records with a string 'name' field
240
+ p"#record { name: string, age: int }" // Find records with both fields
241
+ p"#record { items: list(Person) }" // Nested schema
242
+ ```
243
+
244
+ **Structural variants:**
245
+
246
+ ```scala
247
+ p"#variant { Left: int, Right: string }" // Find Either-like variants
248
+ ```
249
+
250
+ **Collections:**
251
+
252
+ ```scala
253
+ p"#list(string)" // Find lists of strings
254
+ p"#list(Person)" // Find lists of Person
255
+ p"#map(string, int)" // Find maps from string to int
256
+ p"#option(Person)" // Find optional Person values
257
+ ```
258
+
259
+ **Wildcard:**
260
+
261
+ ```scala
262
+ p"#_" // Find any value (matches everything)
263
+ ```
264
+
265
+ **Combined paths with search:**
266
+
267
+ ```scala
268
+ p".users#Person" // Search for Person in users field
269
+ p"#Person.name" // Find all Person values, then get name
270
+ p".items[*]#Person.email" // Elements then search then field
271
+ p"#list(Person)#Person" // Chained searches
272
+ ```
273
+
215
274
  ## Escape Sequences
216
275
 
217
276
  String and character literals support standard escape sequences:
@@ -623,15 +682,17 @@ val same = p".users[*].email"
623
682
  |------------------------------------------------------|-------------------|
624
683
  | `DynamicOptic.root.field("name")` | `.name` |
625
684
  | `DynamicOptic.root.field("address").field("street")` | `.address.street` |
626
- | `DynamicOptic.root.caseOf("Some")` | `<Some>` |
627
- | `DynamicOptic.root.at(0)` | `[0]` |
628
- | `DynamicOptic.root.atIndices(0, 2, 5)` | `[0,2,5]` |
629
- | `DynamicOptic.elements` | `[*]` |
630
- | `DynamicOptic.root.atKey("host")` | `{"host"}` |
631
- | `DynamicOptic.root.atKey(80)` | `{80}` |
632
- | `DynamicOptic.mapValues` | `{*}` |
633
- | `DynamicOptic.mapKeys` | `{*:}` |
634
- | `DynamicOptic.wrapped` | `.~` |
685
+ | `DynamicOptic.root.caseOf("Some")` | `<Some>` |
686
+ | `DynamicOptic.root.at(0)` | `[0]` |
687
+ | `DynamicOptic.root.atIndices(0, 2, 5)` | `[0,2,5]` |
688
+ | `DynamicOptic.elements` | `[*]` |
689
+ | `DynamicOptic.root.atKey("host")` | `{"host"}` |
690
+ | `DynamicOptic.root.atKey(80)` | `{80}` |
691
+ | `DynamicOptic.mapValues` | `{*}` |
692
+ | `DynamicOptic.mapKeys` | `{*:}` |
693
+ | `DynamicOptic.wrapped` | `.~` |
694
+ | `DynamicOptic.root.searchSchema(SchemaRepr.Nominal("Person"))` | `#Person` |
695
+ | `DynamicOptic.root.searchSchema(SchemaRepr.Primitive("string"))` | `#string` |
635
696
 
636
697
  ## Summary
637
698
 
@@ -584,6 +584,22 @@ sbt "schema-examples/runMain comptime.AllowsCsvExample"
584
584
  ```
585
585
 
586
586
  ```scala title="schema-examples/src/main/scala/comptime/AllowsCsvExample.scala"
587
+ /*
588
+ * Copyright 2024-2026 John A. De Goes and the ZIO Contributors
589
+ *
590
+ * Licensed under the Apache License, Version 2.0 (the "License");
591
+ * you may not use this file except in compliance with the License.
592
+ * You may obtain a copy of the License at
593
+ *
594
+ * http://www.apache.org/licenses/LICENSE-2.0
595
+ *
596
+ * Unless required by applicable law or agreed to in writing, software
597
+ * distributed under the License is distributed on an "AS IS" BASIS,
598
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
599
+ * See the License for the specific language governing permissions and
600
+ * limitations under the License.
601
+ */
602
+
587
603
  package comptime
588
604
 
589
605
  import zio.blocks.schema._
@@ -692,6 +708,22 @@ sbt "schema-examples/runMain comptime.AllowsEventBusExample"
692
708
  ```
693
709
 
694
710
  ```scala title="schema-examples/src/main/scala/comptime/AllowsEventBusExample.scala"
711
+ /*
712
+ * Copyright 2024-2026 John A. De Goes and the ZIO Contributors
713
+ *
714
+ * Licensed under the Apache License, Version 2.0 (the "License");
715
+ * you may not use this file except in compliance with the License.
716
+ * You may obtain a copy of the License at
717
+ *
718
+ * http://www.apache.org/licenses/LICENSE-2.0
719
+ *
720
+ * Unless required by applicable law or agreed to in writing, software
721
+ * distributed under the License is distributed on an "AS IS" BASIS,
722
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
723
+ * See the License for the specific language governing permissions and
724
+ * limitations under the License.
725
+ */
726
+
695
727
  package comptime
696
728
 
697
729
  import zio.blocks.schema._
@@ -798,6 +830,22 @@ sbt "schema-examples/runMain comptime.AllowsGraphQLTreeExample"
798
830
  ```
799
831
 
800
832
  ```scala title="schema-examples/src/main/scala/comptime/AllowsGraphQLTreeExample.scala"
833
+ /*
834
+ * Copyright 2024-2026 John A. De Goes and the ZIO Contributors
835
+ *
836
+ * Licensed under the Apache License, Version 2.0 (the "License");
837
+ * you may not use this file except in compliance with the License.
838
+ * You may obtain a copy of the License at
839
+ *
840
+ * http://www.apache.org/licenses/LICENSE-2.0
841
+ *
842
+ * Unless required by applicable law or agreed to in writing, software
843
+ * distributed under the License is distributed on an "AS IS" BASIS,
844
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
845
+ * See the License for the specific language governing permissions and
846
+ * limitations under the License.
847
+ */
848
+
801
849
  package comptime
802
850
 
803
851
  import zio.blocks.schema._
@@ -922,6 +970,22 @@ sbt "schema-examples/runMain comptime.AllowsSealedTraitExample"
922
970
  ```
923
971
 
924
972
  ```scala title="schema-examples/src/main/scala/comptime/AllowsSealedTraitExample.scala"
973
+ /*
974
+ * Copyright 2024-2026 John A. De Goes and the ZIO Contributors
975
+ *
976
+ * Licensed under the Apache License, Version 2.0 (the "License");
977
+ * you may not use this file except in compliance with the License.
978
+ * You may obtain a copy of the License at
979
+ *
980
+ * http://www.apache.org/licenses/LICENSE-2.0
981
+ *
982
+ * Unless required by applicable law or agreed to in writing, software
983
+ * distributed under the License is distributed on an "AS IS" BASIS,
984
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
985
+ * See the License for the specific language governing permissions and
986
+ * limitations under the License.
987
+ */
988
+
925
989
  package comptime
926
990
 
927
991
  import zio.blocks.schema._
@@ -1017,6 +1081,22 @@ object AllowsSealedTraitExample extends App {
1017
1081
  Demonstrates how Allows constraints are verified at compile time — the code below shows valid examples that compile successfully, and includes comments showing which patterns would be rejected:
1018
1082
 
1019
1083
  ```scala title="schema-examples/src/main/scala/comptime/RdbmsExample.scala"
1084
+ /*
1085
+ * Copyright 2024-2026 John A. De Goes and the ZIO Contributors
1086
+ *
1087
+ * Licensed under the Apache License, Version 2.0 (the "License");
1088
+ * you may not use this file except in compliance with the License.
1089
+ * You may obtain a copy of the License at
1090
+ *
1091
+ * http://www.apache.org/licenses/LICENSE-2.0
1092
+ *
1093
+ * Unless required by applicable law or agreed to in writing, software
1094
+ * distributed under the License is distributed on an "AS IS" BASIS,
1095
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1096
+ * See the License for the specific language governing permissions and
1097
+ * limitations under the License.
1098
+ */
1099
+
1020
1100
  package comptime
1021
1101
 
1022
1102
  import zio.blocks.schema._
@@ -1210,6 +1290,22 @@ object RdbmsDemo {
1210
1290
  Demonstrates how Allows enforces recursive schema constraints at compile time:
1211
1291
 
1212
1292
  ```scala title="schema-examples/src/main/scala/comptime/DocumentStoreExample.scala"
1293
+ /*
1294
+ * Copyright 2024-2026 John A. De Goes and the ZIO Contributors
1295
+ *
1296
+ * Licensed under the Apache License, Version 2.0 (the "License");
1297
+ * you may not use this file except in compliance with the License.
1298
+ * You may obtain a copy of the License at
1299
+ *
1300
+ * http://www.apache.org/licenses/LICENSE-2.0
1301
+ *
1302
+ * Unless required by applicable law or agreed to in writing, software
1303
+ * distributed under the License is distributed on an "AS IS" BASIS,
1304
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1305
+ * See the License for the specific language governing permissions and
1306
+ * limitations under the License.
1307
+ */
1308
+
1213
1309
  package comptime
1214
1310
 
1215
1311
  import zio.blocks.schema._
@@ -48,23 +48,23 @@ val result: Either[SchemaError, Person] = Person.codec.decode(bytes)
48
48
  To include the base schema module with JSON support, add the following dependency to your `build.sbt`:
49
49
 
50
50
  ```scala
51
- libraryDependencies += "dev.zio" %% "zio-blocks-schema" % "0.0.28"
51
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema" % "0.0.30"
52
52
  ```
53
53
 
54
54
  Additional format modules are separate artifacts:
55
55
 
56
56
  ```scala
57
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-avro" % "0.0.28"
58
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-toon" % "0.0.28"
59
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-messagepack" % "0.0.28"
60
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-thrift" % "0.0.28"
61
- libraryDependencies += "dev.zio" %% "zio-blocks-schema-bson" % "0.0.28"
57
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-avro" % "0.0.30"
58
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-toon" % "0.0.30"
59
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-messagepack" % "0.0.30"
60
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-thrift" % "0.0.30"
61
+ libraryDependencies += "dev.zio" %% "zio-blocks-schema-bson" % "0.0.30"
62
62
  ```
63
63
 
64
64
  For cross-platform projects (Scala.js):
65
65
 
66
66
  ```scala
67
- libraryDependencies += "dev.zio" %%% "zio-blocks-schema" % "0.0.28"
67
+ libraryDependencies += "dev.zio" %%% "zio-blocks-schema" % "0.0.30"
68
68
  ```
69
69
 
70
70
  Supported Scala versions: 2.13.x and 3.x.
@@ -152,7 +152,7 @@ object Person extends CompanionOptics[Person] {
152
152
 
153
153
  // Override the codec for the "name" field
154
154
  val customNameCodec = new JsonBinaryCodec[String] {
155
- def decodeValue(in: JsonReader, default: String): String = in.readString(default)
155
+ def decodeValue(in: JsonReader): String = in.readString()
156
156
  def encodeValue(x: String, out: JsonWriter): Unit = out.writeVal(x.toUpperCase)
157
157
  }
158
158