From 1284caad24bced5e6717f3be7482f7e960ab0245 Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Sun, 22 Mar 2026 20:19:13 +0000 Subject: [PATCH 1/2] Add media type guidance for JSONC --- index.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.markdown b/index.markdown index e0b9a91..03e7a54 100644 --- a/index.markdown +++ b/index.markdown @@ -77,6 +77,14 @@ or // -*- jsonc -*- ``` +## Media type + +When transmitting JSONC over a network, senders SHOULD use the media type `application/jsonc`. + +Senders SHOULD NOT use `application/json` for JSONC content, because consumers that only implement JSON may interpret the payload incorrectly or reject it due to the presence of comments and/or trailing commas. + +Consumers that support JSONC SHOULD accept `application/jsonc`. + ## Main Use Cases - Configuration Files: JSONC is useful for configuration files where comments can provide explanations or instructions. From a1e7380575ecef9fe1c6732c708979ee2d643a95 Mon Sep 17 00:00:00 2001 From: Martin Leduc <31558169+DecimalTurn@users.noreply.github.com> Date: Sun, 22 Mar 2026 20:20:20 +0000 Subject: [PATCH 2/2] Update section header from "File extensions" to "Filename extension" in JSONC specification While "File extension" is a common term, the official term appears to be "Filename extension" --- index.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.markdown b/index.markdown index 03e7a54..7ce8354 100644 --- a/index.markdown +++ b/index.markdown @@ -62,7 +62,7 @@ JSONC parsers MAY support trailing commas. For more information regarding traili Comments in JSONC are ignored during parsing, allowing developers to annotate their JSON data without affecting its structure or content. -## File extensions +## Filename extension The recommended file extension for JSONC documents is `.jsonc`.