by wodenokoto · 2y ago · 0 comments
It’s a mark up language unlike the others which are data languages.
In xml you can nest data inside of data. In json you can have data structures that can hold data.
Eg., `<tag>lorem <tag2>ipsum</tag2>.</tag>` is not a thing in the others.
I'm not familiar with the distinction between 'markup languages' and 'data languages'. Ignoring the text/structured mixing issue, which I think is vestigial in XML and unused in DSLs, these are all isomorphic to each other and can nest data inside of data in a similar way:
<person>
<name>John Doe</name>
<age>30</age>
<city>New York</city>
<employment>
<position>Software Engineer</position>
<company>ABC Tech</company>
<years>5</years>
</employment>
</person>
{
"person": {
"name": "John Doe",
"age": 30,
"city": "New York",
"employment": {
"position": "Software Engineer",
"company": "ABC Tech",
"years": 5
}
}
}
person:
name: John Doe
age: 30
city: New York
employment:
position: Software Engineer
company: ABC Tech
years: 5