8. Conformance and interoperability
8.1 Conformance levels
Section titled “8.1 Conformance levels”| Level | Requirements |
|---|---|
| Structural | All rules in sections 1, 2, 5, 6 and 7, with support for any subset of the core types |
| Core | Structural, plus every type in section 3 |
| Type set | Core, plus every type of one official extension type set (section 4), for example “Core + BSON”, “Core + References” or “Core + Error” |
CONFORMANCE_DECLARE MUST
An implementation MUST state which conformance level it meets and, for the structural level, which core types it supports. An implementation in a host language other than ECMAScript MUST also state which mechanisms of its language stand for toJSON, the static fromJSON and the behavior of JSON.stringify (section 5).
8.2 JSON5 input
Section titled “8.2 JSON5 input”ECSON output is always standard JSON (OUTPUT_JSON). Input may also come from humans, for example in configuration files.
JSON5_INPUT SHOULD
Deserializers SHOULD accept JSON5 input. Typed value detection and escaping MUST work identically for JSON and JSON5 input.
8.3 Media type
Section titled “8.3 Media type”MEDIA_TYPE SHOULD
ECSON content exchanged over protocols that carry media types (such as HTTP) SHOULD be labeled application/vnd.ecson+json.
8.4 MongoDB Extended JSON
Section titled “8.4 MongoDB Extended JSON”ECSON is not MongoDB Extended JSON, but they overlap:
- the core
$datestring form equals the MongoDB relaxed form for years 1970 to 9999; - the BSON type set (section 4.1) uses the exact MongoDB canonical forms;
- MongoDB numeric wrappers (
$numberLong,$numberInt,$numberDouble) are not ECSON tags and are preserved as unknown tags.
8.5 Versioning
Section titled “8.5 Versioning”SPEC_SEMVER MUST
This specification MUST be versioned independently of the other specifications of the LingoData family, following Semantic Versioning 2.0.0.
Source: lingodata/ecson@fe27835 · spec/sections/08-conformance.md · ecson 0.2.0 (draft)
LingoData specifications, reference implementations and this site are licensed under the Apache License 2.0. Copyright 2026 Gustavo Gondim.