p
jsont
package jsont
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- jsont
- ValidatorF
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- final case class Env(path: Path, json: Json) extends Product with Serializable
- final case class ErrorAt(at: Path, error: JsonError) extends Product with Serializable
- type Errors = Chain[ErrorAt]
- trait Instances extends AnyRef
-
sealed
trait
JsonError extends AnyRef
Sum of all possible validation errors
- type Path = List[PathStep]
- sealed trait PathStep extends AnyRef
- type Validator = IndexedReaderWriterStateT[Eval, Env, Errors, Unit, Unit, Unit]
- type Validator0[A] = IndexedReaderWriterStateT[Eval, Env, Errors, Unit, Unit, A]
Value Members
-
def
array(predicate: (Vector[Json]) ⇒ Boolean, msg: (Vector[Json]) ⇒ String = ...): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
arrayValidator(validators: Vector[IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]]): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
bigDecimal(predicate: (BigDecimal) ⇒ Boolean, msg: (BigDecimal) ⇒ String = numViolationMsg): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
bigInt(predicate: (BigInt) ⇒ Boolean, msg: (BigInt) ⇒ String = numViolationMsg): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
double(predicate: (Double) ⇒ Boolean, msg: (Double) ⇒ String = numViolationMsg): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
eqNumberValidator(expected: JsonNumber): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
eqStringValidator(expected: String): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
failed(msg: String = "Fail unconditionally"): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
group other
group other
- Definition Classes
- ValidatorF
-
def
falseValidator(): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
group other
group other
- Definition Classes
- ValidatorF
-
def
forall(validator: IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
int(predicate: (Int) ⇒ Boolean, msg: (Int) ⇒ String = numViolationMsg): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
liftPredicate[A](predicate: (A) ⇒ Boolean, msg: (A) ⇒ String): (A) ⇒ IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
long(predicate: (Long) ⇒ Boolean, msg: (Long) ⇒ String = numViolationMsg): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
nullValidator(): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
group other
group other
- Definition Classes
- ValidatorF
-
def
number(predicate: (JsonNumber) ⇒ Boolean, msg: (JsonNumber) ⇒ String = numViolationMsg): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
objectValidator(objValidator: Vector[(String, IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit])]): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
val
pass: IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
group other
group other
- Definition Classes
- ValidatorF
-
def
regex(regex: Regex): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
- def run(validator: Validator, json: Json): Chain[ErrorAt]
-
def
string(predicate: (String) ⇒ Boolean, msg: (String) ⇒ String = ...): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
trueValidator(): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
group other
group other
- Definition Classes
- ValidatorF
-
def
withArray(onArray: (Vector[Json]) ⇒ IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
withNumber(f: (JsonNumber) ⇒ IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
-
def
withString(f: (String) ⇒ IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]): IndexedReaderWriterStateT[Eval, Env, Chain[ErrorAt], Unit, Unit, Unit]
- Definition Classes
- ValidatorF
- object Env extends Serializable
- object ErrorAt extends Serializable
- object JsonError extends Instances
- object PathStep