class JSONSchema::BooleanValidator
- JSONSchema::BooleanValidator
- Reference
- Object
Overview
Validates schema where the type
is boolean
.
This is a raw Validator
class that you most likely do not need to use directly.
See the JSONSchema#create_validator
macro, JSONSchema#from_json
, or JSONSchema.fluent
for common usage of this shard.
Defined in:
render.crserialize.cr
validator.cr
Instance Method Summary
- #to_cr
-
#to_json(json : JSON::Builder)
Serialize the validator into its string representation.
- #validate(node : JSON::Any, context = NodeContext.new)
Instance Method Detail
def to_json(json : JSON::Builder)
#
Serialize the validator into its string representation.
js = JSONSchema.fluent
validator = js.boolean
validator.to_json # => {"type":"boolean"}