Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is JSON a markup language like XML? [duplicate]

Tags:

json

xml

markup

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?

like image 769
user3650191 Avatar asked Dec 25 '14 13:12

user3650191


People also ask

Is JSON a markup languages?

Although the developer of JSON declared in 2006 that JSON is not a markup language, it is now often treated as such. The generic JSON is used as the basis for specific formats, which specify names and for more specific syntax for values. Examples include GeoJSON and its extension TopoJSON.

What type of language is JSON?

JSON was based on a subset of the JavaScript scripting language (specifically, Standard ECMA-262 3rd Edition—December 1999) and is commonly used with JavaScript, but it is a language-independent data format. Code for parsing and generating JSON data is readily available in many programming languages.

Can JSON replace XML?

JSON was designed for data interchange and provides a simpler and more concise format for the interchange of data than XML. XML was not designed just for data interchange and provides many other capabilities that JSON does not provide. JSON is ideal for simple data requirements. XML is ideal for the rest.

Why JSON is preferred over XML?

JSON is faster because it is designed specifically for data interchange. JSON encoding is terse, which requires less bytes for transit. JSON parsers are less complex, which requires less processing time and memory overhead. XML is slower, because it is designed for a lot more than just data interchange.


1 Answers

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.

like image 172
Quentin Avatar answered Sep 28 '22 05:09

Quentin