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. Analogues of List
in other schema include: - JATS XML <list>
- HTML <ul>
and <ol>
- MDAST List
- OpenDocument <text:list>
Properties​
Name | @id | Type | Description | Inherited from |
---|---|---|---|---|
items | schema:itemListElement | Array of ListItem | The items in the list | List |
id | schema:id | string | The identifier for this item. | Entity |
meta | stencila:meta | object | Metadata associated with this item. | Entity |
order | schema:itemListOrder | 'Ascending', 'Descending', 'Unordered' | Type of ordering. | List |
Examples​
{
"type": "List",
"items": [
{
"type": "ListItem",
"content": [
"Item One"
]
},
{
"type": "ListItem",
"content": [
"Item Two"
]
},
{
"type": "ListItem",
"content": [
"Item Three"
]
}
]
}
{
"type": "List",
"items": [
{
"type": "ListItem",
"content": "Item One"
},
{
"type": "ListItem",
"content": [
"This is a nested item",
{
"type": "List",
"order": "ordered",
"items": [
{
"type": "ListItem",
"content": [
"Nested Item One"
]
},
{
"type": "ListItem",
"content": [
"Nested Item Two"
]
},
{
"type": "ListItem",
"content": [
"Nested Item Three"
]
}
]
}
]
},
{
"type": "ListItem",
"content": [
"Item Three"
]
}
]
}
{
"type": "List",
"items": [
{
"type": "ListItem",
"checked": false,
"content": [
"Todo item"
]
},
{
"type": "ListItem",
"checked": true,
"content": [
"Completed todo item"
]
}
]
}
Related​
- Parent: Entity
- Descendants: None
Available as​
- JSON-LD
- JSON Schema
- Python
class List
- TypeScript
interface List
- R
class List
- Rust
struct List
Source​
This documentation was generated from List.schema.yaml.