Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSON 3-letter file extension convention

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.

like image 903
Baard Avatar asked Nov 10 '22 12:11

Baard


1 Answers

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.
like image 119
Joshua Clayton Avatar answered Nov 15 '22 07:11

Joshua Clayton