Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Metadata

https://schemas.wur.nl/betula/core/metadata/0.6.0/schema.json

Free-form key/value metadata, GFF3-attribute-style: each value is a single string, or a list of strings for multi-valued tags.

Valid examples

simple.json
{
  "name": ["MtrunA17Chr1g0184451"],
  "note": "single-valued tag"
}

Invalid examples

non-string-value.json
{
  "count": 42
}
Schema source
metadata.schema.json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.wur.nl/betula/core/metadata/0.6.0/schema.json",
  "title": "Metadata",
  "description": "Free-form key/value metadata, GFF3-attribute-style: each value is a single string, or a list of strings for multi-valued tags.",
  "type": "object",
  "additionalProperties": {
    "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }]
  }
}

Usage

Read a JSON document and parse it as a Metadata. CI runs this exact code against the first valid example above; see Getting started to install the bindings.

Python
TypeScript
Rust
metadata.py
from betula_schema import Metadata, parse_json

with open("metadata.json") as f:
    metadata = parse_json(Metadata, f.read())
# Metadata is a RootModel; metadata.root is the plain value
print(metadata)