JsonPrismMacro
Macros backing JsonPrism.field(_.fieldName), selectDynamic, at(i), each, fields. Extracts the field name from the selector AST (same pattern as eo-generics' lens[S](_.field)) and emits a widenPath call.
val streetPrism: JsonPrism[String] =
codecPrism[Person].field(_.address).field(_.street)
Attributes
- Source
- JsonPrismMacro.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JsonPrismMacro.type
Members list
Value members
Concrete methods
.at(i) — verifies A <: Iterable, summons element codecs, emits widenPathIndex.
.at(i) — verifies A <: Iterable, summons element codecs, emits widenPathIndex.
Attributes
- Source
- JsonPrismMacro.scala
Traversal counterpart to atImpl — extends the suffix by an array index.
Traversal counterpart to atImpl — extends the suffix by an array index.
Attributes
- Source
- JsonPrismMacro.scala
.each — emits toTraversal[B] over A's element type.
Child JsonPrism[B] from parent: JsonPrism[A] via a (_.field) selector.
Child JsonPrism[B] from parent: JsonPrism[A] via a (_.field) selector.
Attributes
- Source
- JsonPrismMacro.scala
Traversal counterpart to fieldImpl — extends the suffix by a named field.
Traversal counterpart to fieldImpl — extends the suffix by a named field.
Attributes
- Source
- JsonPrismMacro.scala
.fields(_.a, _.b, ...) — multi-field focus. Validates arity ≥ 2, duplicate-ness, known fields, non-nested. Synthesises an NT in SELECTOR order, summons codecs, emits toFieldsPrism. Error-message catalogue tested by FieldsMacroErrorSpec.
.fields(_.a, _.b, ...) — multi-field focus. Validates arity ≥ 2, duplicate-ness, known fields, non-nested. Synthesises an NT in SELECTOR order, summons codecs, emits toFieldsPrism. Error-message catalogue tested by FieldsMacroErrorSpec.
Attributes
- Source
- JsonPrismMacro.scala
Traversal counterpart to fieldsImpl.
Drives codecPrism[Person].address. Looks the field up on A's schema, summons its codecs, emits widenPath. Returns Expr[Any] so transparent inline refines per call site.
Drives codecPrism[Person].address. Looks the field up on A's schema, summons its codecs, emits widenPath. Returns Expr[Any] so transparent inline refines per call site.
Attributes
- Source
- JsonPrismMacro.scala
Traversal counterpart to selectFieldImpl — drives Dynamic sugar by extending the suffix.
Traversal counterpart to selectFieldImpl — drives Dynamic sugar by extending the suffix.
Attributes
- Source
- JsonPrismMacro.scala