Esc

COMARK2609 · warning

comark/table/json-not-rows

Write a table's JSON as an array of objects

A table reads JSON as an array of objects, one per row, with a column for every key. A single object, or an array of arrays or numbers, has no rows to read, so the table renders nothing.

Incorrect

::table
```json
{ "Mill pond": 14, "Castle moat": 3 }
```
::
md
lint-comark example.mdexample.md:1:1 comark/table/json-not-rows::table 1: its JSON must be an array of objects, one per row, such as [{"name": "a", "size": 1}].Change the block as the message says.✖ 1 problem

Correct

::table
```json
[{ "pond": "Mill pond", "ducks": 14 }, { "pond": "Castle moat", "ducks": 3 }]
```
::
md
lint-comark example.md✔ No problems