JSON 3-letter file extension convention
Asked Answered
S

1

9

RFC7159 states that the file extension to a stored JSON file should be .json. I work with a file system with only 3-letter file extension. Is there any commonly accepted file extension for a JSON file in such systems?

As no 3-letter convention exists, should I make something up (e.g. .JON, a 3-letter extension that is presently not used), or stick to .TXT?

Update 16 January 2019. RFC7159 has been obsoleted by RFC8259, which still state that the file extension should be .json.

Sulfamerazine answered 4/6, 2015 at 3:57 Comment(0)
V
3

Since there seems to be no "best practice" for this now rare condition, I might suggest a few ideas in the order that they appeal to me.

  1. First choice: the .js extension. json is also valid javascript, and this should highlight correctly in an editor.
  2. *.TXT will work, and if you have non-developer workers on Windows needing to view or edit them, maybe the easiest for them.
  3. Name your format. If you are stuck with 8.3 files you are almost certainly on an embedded, or otherwise purpose built tiny system. Use your 8+3 bytes in way that is unique and idiomatic of your own system. e.g. *.FRG files are frog descriptors. It probably doesn't matter to your user that they are a json spec as long as they are interpreted correctly.
  4. Finally, *.JSO - Just as the .HTM extension was used for html files when windows couldn't fully express the lower case of final "l", I'm sure .JSO would be just as acceptable, but this would be my last choice.
Volunteer answered 12/7, 2020 at 18:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.