Skip to content

Examples

Patrik edited this page Aug 18, 2026 · 5 revisions

Examples

Real-world AEON documents showing what the format looks like in practice.

Simple Configuration

A typed application config — the most common use case:

aeon:header = {
  mode:string = "strict"
}

app:object = {
  name:string = "Hello World"
  version:number = 1
  active:toggle = on
  tags:list = ["demo", "wiki"]
}

Every value declares its type. No implicit coercion, no guessing.

Configuration with Contracts

Documents can declare which profile and schema contracts they target:

aeon:mode = "strict"
aeon:profile = "aeon.gp.profile.v1"
aeon:schema = "aeon.gp.schema.v1"

app:object = {
  name:string = "AEON"
  port:int32 = 8080
}

The consumer verifies these claims against a trusted registry — the document doesn't self-authenticate.

References and Metadata

AEON supports explicit clone and pointer references, plus attributes for metadata:

defaults:object = {
  retries:number = 3
  timeout:number = 30
}

production:object = {
  retries:number = ~defaults.retries
  timeout:number = ~>defaults.timeout
  host:string = "prod.example.com"
}

user@{role:string = "admin", level:number = 5}:object = {
  name:string = "Pat"
  id:number = 1
}
  • ~defaults.retries is a clone reference (value copy)
  • ~>defaults.timeout is a pointer reference (alias)
  • @{...} attaches metadata without mixing it into the data

Anonymous Child Metadata

List elements, tuple elements, and node children can carry local datatype and attribute heads:

measurements:list = [
  @{unit:string = "cm", precision:number = 2}:number = 3
  @{unit:string = "cm", precision:number = 2}:number = 4
]

point:tuple = (:number = 12, :number = 42)

content:node = <article(
  @{role:string = "title"}:string = "Hello",
  <p("World")>
)>

The payload shape stays simple, while AES and AEOS can still see the metadata attached to each indexed child.

Typed Null Family

AEON distinguishes between different kinds of absence:

email:null = !notSet
fax:null = !notApplicable
oldAccount:null = !tombstone
migration:null = !"awaiting manual review"

This is something most formats collapse into a single null.

Temporal Values

Dates, times, and zone-aware timestamps are first-class:

birthday:date = 1990-06-15
alarm:time = 07:00Z
created:datetime = 2025-01-01T09:30:00Z
meeting:wtc = 2025-01-01T09:30:00Z&Australia/Melbourne

Structured Annotations

Comments can carry structured metadata without affecting the document's meaning:

//# Primary application config
app:object = {
  //? Human-readable application name
  name:string = "Hello World"

  //@ ui(section="meta")
  version:number = 1
}
  • //# — documentation channel
  • //? — hints and guidance
  • //@ — machine-readable annotations

None of these change parsing, paths, or reference legality.

Prose Blocks

Trimticks are useful for multiline text. The reserved prose label marks formatted prose while leaving rich interpretation to a profile or application:

body:prose = >`
  # Release Notes

  This text can be carried as AEON data without escaping every line.
`

Security Envelope

A signed, integrity-checked, encrypted AEON document using the GP security conventions:

aeon:header = {
  encoding:string = "utf-8"
  mode:string = "strict"
  conventions:conventionSet = [
    "aeon.gp.security.v1"
    "aeon.gp.integrity.v1"
    "aeon.gp.signature.v1"
    "aeon.gp.encryption.v1"
  ]
}

message:object = {
  from:string = "Alice"
  to:string = "Bob"
  body:string = "Meet at the lighthouse"
}

close:envelope = {
  integrity:integrityBlock = {
    alg:string = "sha-256"
    hash:string = "7a91e4c8f0f15f4a0ec0c9dfb45535b6270d4d2a51688aa62e0cd31d81234567"
  }
  signatures:signatureSet = [
    {
      alg:string = "ed25519"
      kid:string = "alice"
      sig:string = "BASE64_SIGNATURE_PLACEHOLDER"
    }
  ]
  encryption:encryptionBlock = {
    alg:string = "xchacha20-poly1305"
    kid:string = "bob"
    ciphertext:string = "HEX_OR_BASE64_CIPHERTEXT_PLACEHOLDER"
  }
}

The conventions are declared in the header. The close:envelope block carries integrity hashes, signatures, and encryption metadata — all as typed, validatable AEON data.

Separator Literals

When a value is naturally structured by separators but should remain a single literal:

resolution:sep["x"] = ^1920x1080
ip:sep["."] = ^192.168.1.1
path:sep = ^"root/main/file.aeon"

Node Trees

For document-like structures where tagged elements matter more than key/value pairs:

content:node = <article(
  <h1("Hello")>,
  <p("World")>
)>

Next Steps

Clone this wiki locally