Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Json, XML and RDF [closed]

Tags:

json

xml

rdf

I have a doubt about what are the differences between JSON, XML and RDF.

I read on the internet:

  • 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.

  • The Resource Description Framework (RDF) is a language for representing information about resources in the World Wide Web.

  • Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.

So if I'm not mistaken, Json is used for exchange of data. XML is used for exchange of data too. what are the main differences between these two?

RDF is used to describe resources on the Web and is based on a xml syntax. So the xml can be used both for the exchange of information, both for the description of the new languages​​?

Can you give me some clarification?

EDIT:

What I understand is:

  • "Resource Description Framework" suggests that provides a framework for describing resources. In a university exam I have used RDF to describe the ontology of a company that I have described the main components of a company and the relationships between them. RDF is important for the semantic web because "describe resources" allows us to associate a semantic meaning to resources.

  • XML is a markup language. A markup language is a set of rules that describe the mechanisms of representation (structural, semantic or presentational) of a text (wikipedia). For this reason it can be used to define the structure of the text of RDF or SOAP etc.. You also say that it is used for data serialize.

  • JSON is only for data serialize. To serialize data JSON and XML is similar but with XML and XML SCHEMA I can associate semantic meaning to data, or am I wrong?

like image 510
Neptune Avatar asked Dec 31 '13 15:12

Neptune


1 Answers

XML started life as a document markup language. It has been additionally been widely used to store (serialize) data structures in various computer languages and is the basis of SOAP based web services.

Json and YAML are designed to record data structures. Yaml has been described as a superset of JSON. In practice I have found there is little practical difference apart from the fact that Yaml is simpler to read and write by humans. JSON is now more widely favoured by REST based webservices, due to its simplicity.

RDF is less a data format and more acurately described as a metadata data model. It is used to record information on the internet and is one of the building block standards of the Semantic web. RDF can be expressed in various different formats, for example XML and JSON. I can recommend the following link as an introduction:

  • https://github.com/JoshData/rdfabout/blob/gh-pages/intro-to-rdf.md

For some RDF examples and more discussion on this topic:

  • JSON to XML conversion
like image 158
Mark O'Connor Avatar answered Sep 21 '22 14:09

Mark O'Connor