Skip to content

@maxogden /json-vs-xml.js
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
/**
* Original representation
*/
<?xml-stylesheet type="text/xsl" href="xml2json.xslt"?>
<reports xmlns="http://www.w3.org/2005/Atom"
xmlns:georss="http://www.georss.org/georss">
<entry>
<title>A large tree branch is blocking the road</title>
</entry>
</reports>
/**
* Contains all of the above information but is bloated
*/
{
"reports": {
"@xmlns": {
"$": "http://www.w3.org/2005/Atom",
"georss": "http://www.georss.org/georss"
},
"entry": [{
"title": {
"$": "A large tree branch is blocking the road"
}
}]
}
}
/**
* Minimalist and developer centric; doesn't contain foreign information such as XML namespace info
*/
{
"reports": [{
"title": "A large tree branch is blocking the road"
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.