Skip to content

Commit

Permalink
Move description of defaults to separate section
Browse files Browse the repository at this point in the history
Since the discussion also applies to the struct codec.
  • Loading branch information
hyanwong committed Jul 25, 2023
1 parent ab5ef8f commit 8d58b28
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ using the Python API.
.. todo:: Add examples of adding table-level metadata schemas.
```

### Defaults

```{eval-rst}
.. todo:: Add examples of setting default values.
```

Default values for properties can be specified for only
the shallowest level of the metadata object.

(sec_metadata_codecs)=

## Codecs
Expand All @@ -121,8 +130,7 @@ When `json` is specified as the `codec` in the schema the metadata is encoded in
the human readable [JSON](https://www.json.org/json-en.html) format. As this format
is human readable and encodes numbers as text it uses more bytes than the `struct`
format. However it is simpler to configure as it doesn't require any format specifier
for each type in the schema. Default values for properties can be specified for only
the shallowest level of the metadata object. Tskit deviates from standard JSON in that
for each type in the schema. Tskit deviates from standard JSON in that
empty metadata is interpreted as an empty object. This is to allow setting of a schema
to a table with out the need to modify all existing empty rows.

Expand Down

0 comments on commit 8d58b28

Please sign in to comment.