I'm a little bit confused, because some websites tell me JSON is not a markup language like XML, but a few say the opposite. Maybe you can give me some hint?
-
There's http://www.jsonml.org/ – nawfal Nov 25 '15 at 13:20
-
The "like" xml portion of this question is removable. This is not a duplicate, just stackoverflow being overzealous. Proof: I arrived here by googling "Is json a markup language". – TZubiri Feb 11 '20 at 09:25
3 Answers
JSON is not a markup language. A dictionary definition of markup is:
a set of instructions on a manuscript or tags in an electronic document to determine styles of type, makeup of pages, and the like.
A markup language follows this theme. It is a syntax for annotating text with semantic meaning.
For example, when I put <i>italics on this text</i>, that is done with markup.
JSON doesn't/can't do that. JSON is simply a notation for encoding common computer data types in a readable form.

- 48,794
- 16
- 117
- 146
From Wikipedia:
A (document) markup language is a modern system for annotating a document in a way that is syntactically distinguishable from the text. The idea and terminology evolved from the "marking up" of paper manuscripts, i.e., the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts.
So, no. JSON is not a Markup Language.
For that matter, nor is XML. Wikipedia describes it as "a meta markup language" since it provides a foundation for creating markup languages on.
JSON is like XML in that it is used to structure data in a text format and is commonly used to exchange data over the Internet.

- 914,110
- 126
- 1,211
- 1,335
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.
I guess it depends on what you understand with "Markup". :)

- 104,512
- 87
- 279
- 422
-
yeah if I look at the function of xml and json, it's nearly the same: making content readable for machines and human... – user3650191 Dec 25 '14 at 13:45
-
1Good comment; It's all about semantics. Strictly it is not a mark up language. It's not even a language. It's just data format. But you mark up objects, arrays etc. independently for many languages. So a gray area this. – Mouser Dec 25 '14 at 13:46