package data
- Alphabetic
- Public
- All
Type Members
-
sealed
trait
ExpectedTerminator extends AnyRef
ADT to represent expected terminator when parsing json it's only use when decoding number because number does not comes with native terminator
ADT to represent expected terminator when parsing json it's only use when decoding number because number does not comes with native terminator
eg. it's evident that
"halo"
is a complete string, and"halo
is not, but we cannot do the same for number2000
and20000
both can be incomplete depending on the subsequent characters - final case class GetKey[F[_], I](key: String, next: F[I]) extends ParseOps[F, I] with Product with Serializable
- final case class GetN[F[_], I](n: Int, next: F[I]) extends ParseOps[F, I] with Product with Serializable
- final case class GetNum(term: ExpectedTerminator) extends ParseOps[Nothing, Double] with Product with Serializable
-
final
case class
GetOpt[F[_], I](next: F[I]) extends ParseOps[F, Option[I]] with Product with Serializable
Optional is a special case as it changes the shape of the type from I => Option[I] This causes issue when you have nesting Optional value, like Some(Some(Some(None))) Currently this issue is handled by manual flattening in interpreter
- final case class GetProduct[F[_], I](allOf: FreeApplicative[F, I]) extends ParseOps[F, I] with Product with Serializable
- final case class GetSum[F[_], I](oneOf: NonEmptyMap[String, Lazy[F[I]]]) extends ParseOps[F, I] with Product with Serializable
-
case class
HFix[F[_[_], _], I](unfix: F[[β$3$]HFix[F, β$3$], I]) extends Product with Serializable
In :: fT => T Out :: T => fT
-
trait
HFunctor[F[_[_], _]] extends AnyRef
Higher functor provides ability to
- final case class IndexPath(i: Int) extends PPath with Product with Serializable
- case class KeyMissingError(key: String, path: Vector[PPath]) extends ParseError with Product with Serializable
- final case class KeyPath(key: String) extends PPath with Product with Serializable
- final case class Mapped[F[_], H, I](fi: F[H], fn: (H) ⇒ I) extends ParseOps[F, I] with Product with Serializable
- case class OneOf extends ExpectedTerminator with Product with Serializable
-
sealed
trait
PPath extends AnyRef
ADT to represent the position of parsing mainly for error reporting
ADT to represent the position of parsing mainly for error reporting
Right now it just show the path we are
trying
to parseBut the decoder actually perform parsing and skipping, we should look into incorporating information of skipping into it
- sealed trait ParseError extends AnyRef
- final case class ParseFailure(msg: String, path: Vector[PPath] = Vector.empty) extends Exception with Product with Serializable
-
sealed
trait
ParseOps[+F[_], +I] extends AnyRef
Potentially recursive tree to represent data we want from json
- case class UnexpectedType(expectedType: String, unexpectedChar: Char, path: Vector[PPath]) extends ParseError with Product with Serializable
Value Members
- object Bracket extends ExpectedTerminator with Product with Serializable
- object Comma extends ExpectedTerminator with Product with Serializable
- object CurlyBrace extends ExpectedTerminator with Product with Serializable
- object End extends ExpectedTerminator with Product with Serializable
- object ExpectedTerminator
- object GetBool extends ParseOps[Nothing, Boolean] with Product with Serializable
- object GetString extends ParseOps[Nothing, String] with Product with Serializable
- object HFix extends Serializable
-
object
Nullable extends PPath with Product with Serializable
questionable design Designed this way so we can mark a path as nullable without knowing what the path actually is
- object PPath
- object ParseFailure extends Serializable
- object ParseOps