Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is JSON a language, if not how would it be classified?

Considering JSON (JavaScript Object Notation), is JSON itself a language, or is it only defined in context of another language? By language, I mean a programming language that might be using JSON to transmit/receive data.

It is interesting that XML is not Turing complete, yet has language in its name. Perhaps this implies a broader definition of language for this purpose?

like image 253
bn. Avatar asked Mar 18 '13 23:03

bn.


2 Answers

It's a data interchange format.

JSON (JavaScript Object Notation) is a lightweight data-interchange format.

http://json.org

JavaScript Object Notation is a text-based open standard designed for human-readable data interchange.

Type of format: Data interchange

http://en.wikipedia.org/wiki/Json


is it only defined in context of a language

Certainly not. It is entirely possible to write applications which use JSON but not JavaScript.

like image 56
Matt Ball Avatar answered Sep 22 '22 23:09

Matt Ball


I would classify it as a format of structured data, not a language. This Wikipedia article about Turing completeness does a pretty good job summing it up:

The notion of Turing-completeness does not apply to languages such as XML, HTML, JSON, YAML and S-expressions, because they are typically used to represent structured data, not describe computation. These are sometimes referred to as markup languages, or more properly as "container languages" or "data description languages".

like image 27
bigpopakap Avatar answered Sep 21 '22 23:09

bigpopakap