#Json Format

1 messages · Page 1 of 1 (latest)

spiral tinsel
#

Why are all the example configuration json shown in docs, not quoting the object keys? This is invalid json, or is this json5?

tribal turretBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

hollow sedgeBOT
#

It’s JSON5, on purpose.

OpenClaw’s config file is ~/.openclaw/openclaw.json, but it’s parsed as JSON5, so examples can use:

  • unquoted object keys (agents: { ... })
  • comments (// ...)
  • trailing commas

Docs spell it out here: https://docs.openclaw.ai/gateway/configuration (first line: “OpenClaw reads an optional JSON5 config from ~/.openclaw/openclaw.json.”)

If you prefer strict JSON, that’s fine too — JSON is valid JSON5 — just add quotes and remove comments/trailing commas.