What is the different between xml and json?

+1 vote
I have seen xml and json are standard for transfer data between multiple devices.
Feb 7 in Others by deepa
• 130 points

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote

JSON (JavaScript Object Notation)-  A lightweight data-interchange format which is completely language independent. It is based on the JavaScript programming language and easy to generate.

A JSON file will look something like this:-


    { "firstName":"Priyaj", "lastName":"Kumar" },
    { "firstName":"Omkar", "lastName":"Hiremath" },
    { "firstName":"Kalgi", "lastName":"Shah" },


XML(Extensible Markup Language)- It is used to carry data and not display data. XML is a markup language that is used to define a set of rules for encoding the document in a format that is both human-readable and machine-readable.

The XML file will look something like this:-

        <firstName>Priyaj</firstName> <lastName>Kumar</lastName> 
        <firstName>Omkar</firstName> <lastName>Hiremath</lastName> 
        <firstName>Kalgi</firstName> <lastName>Shah</lastName> 
answered Feb 7 by Priyaj
• 56,140 points
ok fine. and thankyou
+1 vote

These are the differences:

It is JavaScript Object Notation It is Extensible markup language
It is based on JavaScript language. It is derived from SGML.
It is a way of representing objects. It is a markup language and uses tag structure to represent data items.
It does not provides any support for namespaces. It supports namespaces.
It supports array. It doesn’t supports array.
Its files are very easy to read as compared to XML. Its documents are comparatively difficult to read and interpret.
It doesn’t use end tag. It has start and end tags.
It is less secured. It is more secured than JSON.
It doesn’t supports comments. It supports comments.
It supports only UTF-8 encoding. It supports various encoding.
answered Feb 7 by Junaid
Thank you @junaid, good explanation.

Related Questions In Others

0 votes
1 answer

What is the difference between hadoop and google analytics ?

I will try and answer this as ...READ MORE

answered Aug 21, 2018 in Others by Frankie
• 9,710 points
0 votes
1 answer

What is the difference between BASH and DOS?

The major difference between the BASH and ...READ MORE

answered Mar 8 in Others by Nabarupa
0 votes
2 answers

What is white box testing and how is it different from black box testing?

Black Box Testing is a software testing method in ...READ MORE

answered Feb 20 in Others by preetiagarwal
• 170 points
0 votes
0 answers

Mention the difference between Data Driven Testing and Retesting?

Retesting:  It is a process of checking ...READ MORE

Feb 1 in Others by riya

closed Feb 1 by Omkar 100 views
0 votes
1 answer

What are the different modes to use a VI editor?

VI editor in linux can be use ...READ MORE

answered Mar 8 in Others by Nabarupa
0 votes
1 answer

Xml to Json Conversion

To convert XML File in to JSON ...READ MORE

answered Jan 10 in Java by developer_1
• 3,280 points
0 votes
1 answer

How to simplify or automate task group creation in TFS?

You can easily import or export task ...READ MORE

answered Apr 25, 2018 in DevOps & Agile by ajs3033
• 7,080 points
0 votes
1 answer

Parse JSON in Python

import json data=json.loads(employee_data) print(data) READ MORE

answered Apr 26, 2018 in Python by aayushi
• 750 points
0 votes
1 answer

How to import data from a Json file into R?

Easy and simple: library("rjson") json_file <- "file_name" json_data <- fromJSON(file=json_file)) or ...READ MORE

answered Apr 26, 2018 in Data Analytics by DeepCoder786
• 1,700 points
+1 vote
1 answer

What is the difference between Dark Web and Deep Web?

The content that which you cannot find ...READ MORE

answered Feb 6 in Others by Priyaj
• 56,140 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.