Cohabitation example
Exercises the peaceful-cohabitation rule (§3.7): unknown reserved keys, bare-string localized values, and technology tags outside the recommended vocabulary are all preserved, not rejec
---# SPDX-FileCopyrightText: 2026 Damián Búho <damian.buho@proton.me>## SPDX-License-Identifier: CC-BY-4.0# SPDX-License-Identifier: MIT
# Positive fixture (YAML) — peaceful cohabitation (Section 3.7).## This document contains:# - an unknown reserved key (`vendor-policy:`) — a single-segment lowercase key# not defined in this version of the spec# - an unknown extension namespace (`com.never-heard-of.this` as nested map)# - a technology tag outside the recommended vocabulary (`my-internal-runtime`)# - a bare string for `identity.title` (shorthand for `{ und: "..." }`)# - a mapped `identity.summary` beside it (mixed localized forms, Section 7)## All five MUST be accepted by a v1 validator; their values MUST be preserved# on round-trip. This is the contract that lets independently developed tools# share the same file.
$schema: https://projectfile.org/schema/v1.json
identity: namespace: org.example name: cohabitation title: "Cohabitation Demo" summary: en: "Shows what a v1 validator accepts and preserves."
technologies: - python - my-internal-runtime
vendor-policy: rotate-secrets-every-days: 30 notes: "imagined future reserved field; current consumers ignore + preserve"
com: never-heard-of: this: whatever: "we want" deeply: nested: - 1 - 2"$schema" = "https://projectfile.org/schema/v1.json"technologies = [ "python", "my-internal-runtime" ]
[identity]namespace = "org.example"name = "cohabitation"title = "Cohabitation Demo"
[identity.summary]en = "Shows what a v1 validator accepts and preserves."
[vendor-policy]rotate-secrets-every-days = 30notes = "imagined future reserved field; current consumers ignore + preserve"
[com.never-heard-of.this]whatever = "we want"
[com.never-heard-of.this.deeply]nested = [ 1, 2 ]{ "$schema": "https://projectfile.org/schema/v1.json", "identity": { "namespace": "org.example", "name": "cohabitation", "title": "Cohabitation Demo", "summary": { "en": "Shows what a v1 validator accepts and preserves." } }, "technologies": ["python", "my-internal-runtime"], "vendor-policy": { "rotate-secrets-every-days": 30, "notes": "imagined future reserved field; current consumers ignore + preserve" }, "com": { "never-heard-of": { "this": { "whatever": "we want", "deeply": { "nested": [1, 2] } } } }}