Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8510635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:45:33+00:00 2026-06-11T03:45:33+00:00

I was finding the difference between JSON and XML. As, both are for data

  • 0

I was finding the difference between JSON and XML. As, both are for data interchange between systems, but there is a big difference between JSON and XML that JSON is more lightweight than XML. But I am unable to find the actual reason that why the JSON is light-weight. What makes JSON light-weight??

One answer I found is that in JSON there is not a lot of extra xml markup. What does it actual mean. Are there some more reasons that describes why JSON is lightweight?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:45:35+00:00Added an answer on June 11, 2026 at 3:45 am

    Have you looked at examples of JSON and XML documents?

    While both JSON and XML are used to represent arbitrary trees of data, XML is far more verbose. Every element in the tree has a name (the element type name), and the element must be enclosed in a matching pair of tags. By contrast, JSON expresses trees in a “nested array” type of notation akin to that of Javascript (in fact, a JSON document can literally be parsed as Javascript to result in the corresponding array).

    Take a look at the differences.

    XML is of course semantically richer, since elements can be decorated with an arbitrary number of attributes, and elements may contain mixed content of free text flow and further, nested elements. For example, the following snippet would be tedious to express as JSON:

    <paragraph>
       This is an entire paragraph of <emph>text</emph>. It is interspersed with
       further, nested <emph>XML elements</emph>, as well as the occasional
       <link href="http://stackoverflow.com/a/12346394/596781">hyperlink</link>.
    </paragraph>
    

    On the other hand, data-like documents can be much simpler in JSON. Imagine this:

    <properties>
        <property type="int" name="ID">123</property>
        <property type="date" name="birthday">19700101</property>
        <references>
            <url>http://stackoverflow.com/a/12346394/596781</url>
            <doi>something.made.up</doi>
        </references>
    </properties>
    

    This becomes a very compact JSON array.

    A secondary consideration is the amount of toolsets that surround both formats. While JSON tools are mainly about parsing JSON data, the W3C has been developing a very large set of adherent technologies to manipulate XML in a systematic fashion, such as XSLT and XPATH.

    In a nutshell, and as a very personal opinion, I’d say that XML is about the document and JSON is about data. XML will feel more natural and useful for large, structured documents, while JSON is often the simpler and less verbose format for transmitting data sets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an efficiency difference between finding by id and finding by class with
I'm having a tough time finding the difference between the PHP functions posix_getuid and
Possible Duplicate: are there function pointers in c#? I'm interested in finding the difference
Can any one help me in finding the basic difference between mutable and immutable?
This query works great for finding the difference between successive rows: select id, created_at,
I'm trying to determine the score of an entry by finding the difference between
Possible Duplicate: What is the difference between graph-based databases and object-oriented databases? I'm finding
Simple question I imagine, but what is the difference between these lines of code:
I am working on dates in Java. I am finding out the difference between
There is probably a really straightforward answer to this but I'm having difficulty finding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.