JsonTemplate

io.github.cakelier.tuples.space.JsonTemplate$
See theJsonTemplate companion trait
object JsonTemplate

The companion object to the JsonTemplate trait, containing its implementations.

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case object JsonAnyTemplate extends JsonTemplate

A JsonTemplate that matches any value.

A JsonTemplate that matches any value.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait JsonTemplate
class Object
trait Matchable
class Any
Show all
Self type

Companion object to the JsonBooleanTemplate trait, containing its implementation.

Companion object to the JsonBooleanTemplate trait, containing its implementation.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait JsonBooleanTemplate extends JsonTemplate

A JsonTemplate that matches a boolean value.

A JsonTemplate that matches a boolean value.

A constant value can be specified to be matched against the given JsonElement. If not, only the type equality will be checked.

Attributes

Companion
object
Supertypes
trait JsonTemplate
class Object
trait Matchable
class Any

Companion object to the JsonTemplate trait, containing its implementations.

Companion object to the JsonTemplate trait, containing its implementations.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait JsonMultipleTemplate extends JsonTemplate

A JsonTemplate that matches a JsonElement based on multiple inner JsonTemplates.

A JsonTemplate that matches a JsonElement based on multiple inner JsonTemplates.

Attributes

Companion
object
Supertypes
trait JsonTemplate
class Object
trait Matchable
class Any
Known subtypes

Companion object to the JsonNotTemplate trait, containing its implementation.

Companion object to the JsonNotTemplate trait, containing its implementation.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait JsonNotTemplate extends JsonTemplate

A JsonTemplate that matches a JsonElement if and only if its inner JsonTemplates does not match against the element itself.

A JsonTemplate that matches a JsonElement if and only if its inner JsonTemplates does not match against the element itself.

Attributes

Companion
object
Supertypes
trait JsonTemplate
class Object
trait Matchable
class Any
case object JsonNullTemplate extends JsonTemplate

A JsonTemplate that matches the null constant value.

A JsonTemplate that matches the null constant value.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait JsonTemplate
class Object
trait Matchable
class Any
Show all
Self type

Companion object to the JsonNumericTemplate trait, containing its implementations.

Companion object to the JsonNumericTemplate trait, containing its implementations.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait JsonNumericTemplate[+A] extends JsonTemplate

A JsonTemplate that can be matched against a numeric value.

A JsonTemplate that can be matched against a numeric value.

This template represents all templates that can match a numeric value, so an integer, a long integer, a single precision floating point value and a double precision floating point value. For matching a numeric JsonElement, it can be specified a constant value, an inclusive range for the JsonElement or an inclusive one, both of which can be half-open. If multiple constraint are specified, all of them must be true in order to match with this template, independently of the satisfiability of said constraints. If no constraint is specified, only the type equality will be checked.

Type parameters

A

the type of the numeric JsonElement that this JsonTemplate can match

Attributes

Companion
object
Supertypes
trait JsonTemplate
class Object
trait Matchable
class Any
Known subtypes

Companion object to the JsonStringTemplate trait, containing its implementation.

Companion object to the JsonStringTemplate trait, containing its implementation.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait JsonStringTemplate extends JsonTemplate

A JsonTemplate that can be matched against a string value.

A JsonTemplate that can be matched against a string value.

A JsonElement can be matched using a set of strings, creating what is called in the JSON Schema an "enum". Regardless of this, specifying a Set constrains the values that the JsonElement can have, because no other string value outside of the Set could be accepted. If the Set is the singleton Set, this constraint is perfectly equal to specifying a constant value to be matched against. The given JsonElement can be constrained in terms of an inclusive range of string length, which can be half-open, and in terms of the regular expression that can match it. If no constraint is specified, only the type equality will be checked.

Attributes

Companion
object
Supertypes
trait JsonTemplate
class Object
trait Matchable
class Any

Companion object to the JsonTupleTemplate trait, containing its implementation.

Companion object to the JsonTupleTemplate trait, containing its implementation.

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait JsonTupleTemplate extends JsonTemplate

A JsonTemplate that matches a JsonTuple.

A JsonTemplate that matches a JsonTuple.

This template matches a JsonTuple if and only if its inner JsonTemplates matches against the corresponding elements of the tuple. Being a tuple in fact a representation of a JSON Array, the JSON Schema specification allows matching JSON Arrays even if not all of its elements have a template to match against, but limits the matching abilities only to the first ones, the ones which corresponds to inner templates. This is reflected allowing "additional items" to be present, so allowing that this template can match even if the number of its inner JsonTemplates is not equal to the arity of the tuple, but it is inferior. A template with more inner templates than the tuple that is trying to match against will never match.

Attributes

Companion
object
Supertypes
trait JsonTemplate
class Object
trait Matchable
class Any

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror