Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand All @@ -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.
Expand Down
Loading