Attributes
- Companion
- class
- Source
- JsoniterTraversal.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JsoniterTraversal.type
Members list
Grouped members
Optics
Build a read-write Traversal over a JSON byte buffer at the given JSONPath. The path MAY contain [*] wildcard steps (without them, this collapses to a single-or-zero-focus Traversal that still uses the MultiFocus[PSVec] carrier — fine, just narrower).
Build a read-write Traversal over a JSON byte buffer at the given JSONPath. The path MAY contain [*] wildcard steps (without them, this collapses to a single-or-zero-focus Traversal that still uses the MultiFocus[PSVec] carrier — fine, just narrower).
Throws IllegalArgumentException if the path string is not parseable.
Attributes
- Example
-
import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker given codec: JsonValueCodec[Long] = JsonCodecMaker.make val itemsT = JsoniterTraversal[Long]("$.cart.items[*]") val bytes: Array[Byte] = ... itemsT.foldMap(identity[Long])(bytes) // Long — sum of all items, zero AST allocation itemsT.modify(_ * 10)(bytes) // Array[Byte] — every item spliced in place - Source
- JsoniterTraversal.scala
Extensions
Extensions
.field(_.x) — drill every focus into a field, compile-time checked against A.
.field(_.x) — drill every focus into a field, compile-time checked against A.
Attributes
- Source
- JsoniterTraversal.scala
.at(i) — drill every focus into the i-th element of a nested array.
.at(i) — drill every focus into the i-th element of a nested array.
Attributes
- Source
- JsoniterTraversal.scala