Nokome Bentley1 min read

Array Validator

A validator specifying constraints on an array node.

Properties

The ArrayValidator type has these properties:

Name Description Type Inherited from JSON-LD @id Aliases
id The identifier for this item. String Entity schema:id -
itemsNullable Whether items can have the value Node::Null Boolean - stencila:itemsNullable items-nullable, items_nullable
itemsValidator Another validator node specifying the constraints on all items in the array. Validator - stencila:itemsValidator items-validator, items_validator
contains An array node is valid if at least one of its items is valid against the contains schema. Validator - stencila:contains -
minItems An array node is valid if its size is greater than, or equal to, this value. Integer - stencila:minItems min-items, min_items
maxItems An array node is valid if its size is less than, or equal to, this value. Integer - stencila:maxItems max-items, max_items
uniqueItems A flag to indicate that each value in the array should be unique. Boolean - stencila:uniqueItems unique-items, unique_items

Related

The ArrayValidator type is related to these types:

Formats

The ArrayValidator type can be encoded (serialized) to, and/or decoded (deserialized) from, these formats:

Format Encoding Decoding Support Notes
DOM HTML 🟢 No loss
HTML 🔷 Low loss
JATS
Markdown ⚠️ High loss Encoded using implemented function
Stencila Markdown ⚠️ High loss
Quarto Markdown ⚠️ High loss
MyST Markdown ⚠️ High loss
LLM Markdown ⚠️ High loss
LaTeX 🔷 Low loss 🔷 Low loss
PDF 🔷 Low loss
Plain text ⚠️ High loss
IPYNB 🔷 Low loss 🔷 Low loss
Microsoft Word DOCX 🔷 Low loss 🔷 Low loss
OpenDocument ODT 🔷 Low loss 🔷 Low loss
TeX 🔷 Low loss 🔷 Low loss
JSON 🟢 No loss 🟢 No loss
JSON+Zip 🟢 No loss 🟢 No loss
JSON5 🟢 No loss 🟢 No loss
JSON-LD 🟢 No loss 🟢 No loss
CBOR 🟢 No loss 🟢 No loss
CBOR+Zstandard 🟢 No loss 🟢 No loss
YAML 🟢 No loss 🟢 No loss
Lexical JSON 🔷 Low loss 🔷 Low loss
Koenig JSON 🔷 Low loss 🔷 Low loss
Pandoc AST 🔷 Low loss 🔷 Low loss
Directory
Stencila Web Bundle
Debug 🔷 Low loss

Bindings

The ArrayValidator type is represented in:

Source

This documentation was generated from ArrayValidator.yaml by docs_types.rs.