besoin d'échanger des données entre acteurs
D'où la nécessité d'un format de structuration universel
Généralisation de HTML
<a></b> <!-- Non valide ! -->
<?xml version="1.0" encoding="UTF-8"?>
"http://www.w3.org/1999/xhtml"
"http://www.w3.org/1998/Math/MathML"
"http://www.w3.org/2000/svg"
"http://www.w3.org/TR/REC-rdf-syntax#"
"http://purl.org/dc"
<?xml version=”1.0”?>
<catalog>
<rdf:RDF xmlns:rdf=”http://www.w3.org/TR/REC-rdf-syntax#”>
<rdf:Description about=”http://mon-catalogue” xmlns:dc=”http://purl.org/dc”>
<dc:title>Tableaux impressionistes</dc:title>
<dc:creator>Benoît</dc:creator>
<dc:description>Liste de tableaux célèbres</dc:description>
<dc:date>2009</dc:date>
</rdf:Description>
</rdf:RDF>
<painting>
<title>Souvenir d'un jardin à Eden</title>
<artist>Van Gogh</artist>
<date>1888</date>
<description>Deux femmes regardent sur la gauche ;
une troisième travaille au jardin.</description>
</painting>
...
</catalog></code>
dc
, rdf
, svg
.
xmlns
seul. Par exemple:
<svg xmlns=”http://www.w3.org/2000/svg” width=”12cm” height=”10cm”>
<ellipse rx=”110” ry=”130”/>
<rect x=”4cm” y=”5cm” width=”3cm” height=”4cm”/>
</svg>
{
"firstName": "John",
"lastName" : "Smith",
"age" : 25,
"address" :
{
"streetAddress": "21 2nd Street",
"city" : "New York",
"state" : "NY",
"postalCode" : "10021"
},
"phoneNumber":
[
{ "type" : "home", "number": "212 555-1234" },
{ "type" : "fax", "number": "646 555-4567" }
]
}
eval()
de javascript
JSON.stringify(objet)
JSON.parse(chaine de caractères)