List Item
A single item in a list.
This is an implementation, and extension, of schema.org ListItem
.
It extends schema.ord ListItem
by adding content
and isChecked
properties.
Analogues of ListItem
in other schema include:
- JATS XML
<list-item>
](https://jats.nlm.nih.gov/articleauthoring/tag-library/1.2/element/list-item.html) - HTML
<li>
- MDAST
ListItem
- OpenDocument `text:list-item`
Properties
The ListItem
type has these properties:
Name | Description | Type | Inherited from | JSON-LD @id |
Aliases |
---|---|---|---|---|---|
id |
The identifier for this item. | String |
Entity |
schema:id |
- |
alternateNames |
Alternate names (aliases) for the item. | String * |
Thing |
schema:alternateName |
alternate-names , alternate_names , alternateName , alternate-name , alternate_name |
description |
A description of the item. | String |
Thing |
schema:description |
- |
identifiers |
Any kind of identifier for any kind of Thing. | (PropertyValue | String )* |
Thing |
schema:identifier |
identifier |
images |
Images of the item. | ImageObject * |
Thing |
schema:image |
image |
name |
The name of the item. | String |
Thing |
schema:name |
- |
url |
The URL of the item. | String |
Thing |
schema:url |
- |
content |
The content of the list item. | Block * |
- | stencila:content |
- |
item |
The item represented by this list item. | Node |
- | schema:item |
- |
isChecked |
A flag to indicate if this list item is checked. | Boolean |
- | stencila:isChecked |
is-checked , is_checked |
position |
The position of the item in a series or sequence of items. | Integer |
- | schema:position |
- |
Related
The ListItem
type is related to these types:
- Parents:
Thing
- Children: none
Formats
The ListItem
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 as <li> |
||
JATS | 🔷 Low loss | Encoded as <list-item> |
||
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 ListItem
type is represented in:
- JSON-LD
- JSON Schema
- Python class
ListItem
- Rust struct
ListItem
- TypeScript class
ListItem
Testing
During property-based (a.k.a generative) testing, the properties of the ListItem
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 |
---|---|---|---|
content |
Min+ | Generate a single, arbitrary, paragraph | vec_paragraphs(1) |
Low+ | Generate one, arbitrary, non-list block | vec_blocks_list_item(1) |
|
High+ | Generate up to two, arbitrary, non-list blocks | vec_blocks_list_item(2) |
|
Max | Generate up to four, arbitrary, non-list blocks | vec_blocks_list_item(4) |
Source
This documentation was generated from ListItem.yaml
by docs_types.rs
.