Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Standard defining json file extensions?

Is there a standard or specification which defines json file extensions?

I've seen .json used - is this just a commonly accepted practice or is it a requirement of some standards body for json saved in file format?

like image 521
Iain Sproat Avatar asked Jun 23 '10 18:06

Iain Sproat


1 Answers

According to Douglas Crockford's draft of the JSON format found here:

"A JSON parser transforms a JSON text into another representation. A
JSON parser MUST accept all texts that conform to the JSON grammar. A JSON parser MAY accept non-JSON forms or extensions."

So, it's just a commonly-accepted practice; as long as your file conforms to the JSON grammar the extension doesn't necessarily need to be *.json (although it can certainly be helpful to you and other developers if it is).

like image 75
Donut Avatar answered Nov 01 '22 08:11

Donut