03 Conventionsv0.1.8 → v0.1.9
Changed in v0.1.9 (2026-04-01): add or simply a type for JSON type definition
→+1 −1
| v0.1.8 | v0.1.9 | ||
|---|---|---|---|
| 16 | 16 | ||
| 17 | In this document, a JSON object type defines the required and optional name-value pairs of a JSON object. An object belongs to a type — or "is of that type" — if it contains all required name-value pairs and only name-value pairs that are either required or optional for that type. Each name-value pair in a type definition specifies the name of the pair and the constraint on its value. Required name-value pairs are indicated by the keywords MUST or REQUIRED; optional name-value pairs by MAY, OPTIONAL, SHOULD, or RECOMMENDED, as defined in Section 03.01. | 17 | In this document, a JSON object type defines the required and optional name-value pairs of a JSON object. An object belongs to a type — or "is of that type" — if it contains all required name-value pairs and only name-value pairs that are either required or optional for that type. Each name-value pair in a type definition specifies the name of the pair and the constraint on its value. Required name-value pairs are indicated by the keywords MUST or REQUIRED; optional name-value pairs by MAY, OPTIONAL, SHOULD, or RECOMMENDED, as defined in Section 03.01. |
| 18 | 18 | ||
| 19 | A type is a constraint on a JSON value. A JSON object type, as defined above, is a type that constrains an object by specifying its required and optional name-value pairs. A type may also constrain a non-object value by specifying the set of allowed values, for example, a number within a particular range, or a string equal to one of a specified set. | 19 | A JSON type, or simply a type, is a constraint on a JSON value. A JSON object type, as defined above, is a type that constrains an object by specifying its required and optional name-value pairs. A type may also constrain a non-object value by specifying the set of allowed values, for example, a number within a particular range, or a string equal to one of a specified set. |
| 20 | 20 | ||
| 21 | ## 03.04 Representation of Data | 21 | ## 03.04 Representation of Data |
| 22 | 22 | ||
| 23 | In this document, TypeScript code is used to represent data, such as JSON object and JSON object type. However, the TypeScript code SHOULD NOT be considered the only form in which the data can be realized in an implementation. | 23 | In this document, TypeScript code is used to represent data, such as JSON object and JSON object type. However, the TypeScript code SHOULD NOT be considered the only form in which the data can be realized in an implementation. |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | ## 03.99 Notes | 26 | ## 03.99 Notes |
| 27 | 27 | ||
| 28 | The section 03.02 significantly references the standard [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946). | 28 | The section 03.02 significantly references the standard [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946). |