JSON files are basically XML files that run better in browsers, but they are still different. XML can be a bit more specific, but more intensive.
JSON type files are a way of serialization. This means the file condenses for easy downloads/uploads, transmits to another location, and then is interpreted primarily by web browsers.
So, primary purpose is to be able to be functional, compressible, easily loadable and still interpretable, while in that compressed state.
JSON is actually kind of different language from JS, but it is still very much the same. But you will have some trouble if you code the two exactly alike without a translator of some sort, as far as I know.