List
A list of items.
This is an implementation, and renaming, of schema.org ItemList.
Renaming was done as List was considered a more developer friendly alternative. Similarly,
schema.org properties itemListElement and itemListOrder were renamed to items and order.
Note that, as with every other such renaming in Stencila Schema, a mapping between names is
defined and it is trivial to save Stencila Schema documents using the schema.org vocabulary if so desired.
Properties
The List type has these properties:
| Name | Description | Type | Inherited from | JSON-LD @id |
Aliases |
|---|---|---|---|---|---|
id |
The identifier for this item. | String |
Entity |
schema:id |
- |
items |
The items in the list. | ListItem* |
- | schema:itemListElement |
item |
order |
The ordering of the list. | ListOrder |
- | schema:itemListOrder |
- |
authors |
The authors of the list. | Author* |
- | schema:author |
author |
provenance |
A summary of the provenance of the content within the list. | ProvenanceCount* |
- | stencila:provenance |
- |
Related
The List type is related to these types:
- Parents:
Entity - Children: none
Formats
The List 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 | Encoded using special function | ||
| JATS | 🔷 Low loss | Encoded as <list> |
||
| Markdown | 🔷 Low loss | 🔷 Low loss | Encoded using implemented function | |
| Stencila Markdown | 🔷 Low loss | 🔷 Low loss | ||
| Quarto Markdown | 🔷 Low loss | 🔷 Low loss | ||
| MyST Markdown | 🔷 Low loss | 🔷 Low loss | ||
| LLM Markdown | 🔷 Low loss | 🔷 Low loss | ||
| LaTeX | 🔷 Low loss | 🔷 Low loss | ||
| 🔷 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 List type is represented in:
- JSON-LD
- JSON Schema
- Python class
List - Rust struct
List - TypeScript class
List
Testing
During property-based (a.k.a generative) testing, the properties of the List type are generated using the following strategies for each complexity level. Any optional properties that are not in this table are set to None.
| Property | Complexity | Description | Strategy |
|---|---|---|---|
items |
Min+ | Generate a single, arbitrary, list item. | vec(ListItem::arbitrary(), size_range(1..=1)) |
| Low+ | Generate up to two, arbitrary, list items. | vec(ListItem::arbitrary(), size_range(1..=2)) |
|
| High+ | Generate up to four, arbitrary, list items. | vec(ListItem::arbitrary(), size_range(1..=4)) |
|
| Max | Generate up to eight, arbitrary, list items. | vec(ListItem::arbitrary(), size_range(1..=8)) |
|
order |
Min+ | Always generate an unordered list. | ListOrder::Unordered |
| Low+ | Randomly generate either an unordered, or ascending, list. | prop_oneof![Just(ListOrder::Unordered),Just(ListOrder::Ascending)] |
|
| High+ | Generate an arbitrary list ordering. | ListOrder::arbitrary() |
Source
This documentation was generated from List.yaml by docs_types.rs.