JsonFailure

dev.constructive.eo.circe.JsonFailure
See theJsonFailure companion object

Structured failure surfaced by the default Ior-bearing surface of JsonPrism / JsonFieldsPrism / JsonTraversal / JsonFieldsTraversal.

Every case carries a PathStep so the walk that produced the failure can point at the specific cursor position that refused. The default enum toString keeps the structural representation for testability; message gives a human-readable diagnostic.

Attributes

Companion
object
Source
JsonFailure.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class DecodeFailed(step: PathStep, cause: DecodingFailure)

Decoder refused at step. step is PathStep.Field("") at root-level decode failures on a path-empty prism.

Decoder refused at step. step is PathStep.Field("") at root-level decode failures on a path-empty prism.

Attributes

Source
JsonFailure.scala
final case class IndexOutOfRange(step: PathStep, size: Int)

Index was outside [0, size) at step. size is the actual array length.

Index was outside [0, size) at step. size is the actual array length.

Attributes

Source
JsonFailure.scala
final case class NotAnArray(step: PathStep)

Parent wasn't a JSON array at step (so the walker couldn't index).

Parent wasn't a JSON array at step (so the walker couldn't index).

Attributes

Source
JsonFailure.scala
final case class NotAnObject(step: PathStep)

Parent wasn't a JsonObject at step (so the walker couldn't look up a field).

Parent wasn't a JsonObject at step (so the walker couldn't look up a field).

Attributes

Source
JsonFailure.scala
final case class ParseFailed(cause: ParsingFailure)

Input String didn't parse as JSON. Surfaced only by the Json | String overloads; when the caller passes a Json directly this case cannot fire. The wrapped ParsingFailure carries circe's line/column diagnostics.

Input String didn't parse as JSON. Surfaced only by the Json | String overloads; when the caller passes a Json directly this case cannot fire. The wrapped ParsingFailure carries circe's line/column diagnostics.

Attributes

Source
JsonFailure.scala
final case class PathMissing(step: PathStep)

Named field absent from its parent JsonObject at step.

Named field absent from its parent JsonObject at step.

Attributes

Source
JsonFailure.scala