Skip to content

Commit 2edaecb

Browse files
committed
Register TOON as a media type.
1 parent ec75efc commit 2edaecb

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

registries/_media-type/toon.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
owner: handrews
3+
name: Token-Oriented Object Notation (TOON)
4+
description: Compact encoding of the JSON data model for LLM prompts
5+
media_types:
6+
- name: text/toon
7+
iana: false
8+
specifications:
9+
- name: TOON Specification
10+
url: https://github.com/toon-format/spec/blob/main/SPEC.md
11+
layout: default
12+
---
13+
14+
{% capture summary %}
15+
Since TOON is simply an alternate serialization of the JSON data model, and serialization is not a concern of the OAS, `text/toon` can be treated the same as `application/json` for the purposes of the Schema Object.
16+
{% endcapture %}
17+
18+
{% capture remarks %}
19+
Note, however, that TOON specifies object property order preservation in terms of encounter order, which is not necessarily the same as the order of properties in a Schema Object. JSON Schema is not able to specify object property order.
20+
21+
Similarly, TOON encoding options such as keyfolding are outside of the scope of the Schema Object and the OAS, as they are not specified as media type parameters.
22+
23+
Finally, the `text/toon` media type is provisional; if it is changed, it is expected that the new media type will work the same as the current one.
24+
{% endcapture %}
25+
26+
{% include media-type-entry.md summary=summary remarks=remarks %}

0 commit comments

Comments
 (0)