Reputation: 7949
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?
Upvotes: 16
Views: 19068
Reputation: 381
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".
Upvotes: 1
Reputation: 494
According to Computer Science, JSON accomplishes the definition of language, so it is definitely a language (in the same way XML is). Is is basically a set of possible strings formed by symbols of an alphabet. It has also syntactic rules.
But it is not a programming language. In terms of programming, it is a format or notation.
Upvotes: 2
Reputation: 943537
JSON is a data format. It could be classified as a language, but not a programming language.
Its relationship to JavaScript is that it shares its syntax (more or less) with a subset of JavaScript literals. The JSON specification defines it completely; it doesn't depend on references to the JavaScript specification.
Upvotes: 4
Reputation: 359816
It's a data interchange format.
JSON (JavaScript Object Notation) is a lightweight data-interchange format.
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.
Upvotes: 20