JsoniterPath

dev.constructive.eo.jsoniter.JsoniterPath
See theJsoniterPath companion object
trait JsoniterPath[A, P[_]] extends Dynamic

The path builder every eo-jsoniter optic drills with: .field(_.x), .at(i) and the Dynamic sugar .x, each compile-time checked against A's schema and appending one PathStep. Shared by the whole-array optics (JsoniterPrism, JsoniterTraversal) and their in-place faces (JsoniterInPlacePrism, JsoniterInPlaceTraversal), so one set of macros builds all four and .inPlace can be taken anywhere in a chain: JsoniterPrism.inPlace[Person].address and JsoniterPrism[Person].address.inPlace are the same optic.

Type parameters

A

the focus type the next step is checked against

P

the optic one step further on: the same kind of optic over a new focus

Attributes

Companion
object
Source
JsoniterPath.scala
Graph
Supertypes
trait Dynamic
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

transparent inline def at(i: Int): Any
Extension method from JsoniterPath

.at(i) — drill into the i-th array element.

.at(i) — drill into the i-th array element.

Attributes

Source
JsoniterPath.scala
transparent inline def field[B](inline selector: A => B)(using codecB: JsonValueCodec[B]): P[B]
Extension method from JsoniterPath

.field(_.x) — drill via selector lambda, compile-time checked against A's case fields.

.field(_.x) — drill via selector lambda, compile-time checked against A's case fields.

Attributes

Source
JsoniterPath.scala
transparent inline def selectDynamic(inline name: String): Any

Dynamic field sugar — JsoniterPrism[Person].name lowers to JsoniterPrism[Person].field(_.name). Compile-time checked against A's case fields; the field's JsonValueCodec is summoned at the call site.

Dynamic field sugar — JsoniterPrism[Person].name lowers to JsoniterPrism[Person].field(_.name). Compile-time checked against A's case fields; the field's JsonValueCodec is summoned at the call site.

Attributes

Source
JsoniterPath.scala