<div dir="ltr">XML is mostly gone except it is used in Maven and Tomcat. XML is verbose but it's one advantage over json and yaml is that you can embed comments in the file. I prefer json over yaml for the same complaint I have with Python, the lack of real block delimiters. I really like the fact that their are json beautifiers which also catch mistakes in the json file.<div><br></div><div>cat random-file.json | python -m json.tool</div><div><br></div><div><br></div><div><br></div><div>Josef </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 9, 2020 at 4:09 PM Deirdre Saoirse Moen <<a href="mailto:deirdre@deirdre.net">deirdre@deirdre.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Rick and I got into a discussion of these three different markup formats over the last few days (due to my post on the list mentioning it, and I thought I’d mention something I’d learned recently.<div><br></div><div>I was at Silicon Valley Code Camp and went to this talk on the history of JSON: <a href="https://www.youtube.com/watch?v=xZdNGfFh5BY" target="_blank">https://www.youtube.com/watch?v=xZdNGfFh5BY</a></div><div><br></div><div>Douglas Crockford, the JSON codifier, pointed out that XML had essentially vanished in all but legacy enterprise applications. And it’s true, I haven’t seen it mentioned on job listings in years. Only JSON.</div><div><br></div><div>In terms of simplicity, YAML > JSON > XML.</div><div><br></div><div>What’s interesting is that, despite YAML being a simpler format, as of YAML 1.2, all JSON files are also YAML-compliant. (The reverse is not true.)</div><div><br></div><div>I got introduced to YAML with Ruby on Rails and got really into it. You could specify test data like:</div><div><br></div><div><div>uno:</div><div> id: 1</div><div> name: Forest Keeper</div><div> speed: 88</div><div>dos:</div><div> id: 2</div><div> name: Ghost</div><div> speed: 101</div><div>tres:</div><div> id: 3</div><div> name: Horned Frog</div><div> speed: 100</div></div><div><br></div><div>(Note that YAML uses whitespace and indentation as syntactically significant. The names of each record are only used for test purposes and not stored in the db.)</div><div><br></div><div>In JSON, this would be:</div><div><br></div><div><div>{"monsters":[</div><div> {"id": 1,</div><div> "name": "Forest Keeper",</div><div> "speed": 88},</div><div> {"id": 2,</div><div> "name": "Ghost",</div><div> "speed": 101},</div><div> {"id": 3,</div><div> "name": "Horned Frog",</div><div> "speed": 100}</div><div>]}</div></div><div><br></div><div>Too much shifting and unshifting for those quotes and braces, imho, but usable enough.</div><div><br></div><div>XML would be even more verbose and I’m not even gonna go there. It’s a new decade after all.</div><div><br></div><div>Deirdre</div><div><br></div></div>_______________________________________________<br>
conspire mailing list<br>
<a href="mailto:conspire@linuxmafia.com" target="_blank">conspire@linuxmafia.com</a><br>
<a href="http://linuxmafia.com/mailman/listinfo/conspire" rel="noreferrer" target="_blank">http://linuxmafia.com/mailman/listinfo/conspire</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Josef Grosch | Berkeley, CA. | Where ever you go,
<div><a href="mailto:Jgrosch@ebay.com" target="_blank">Jgrosch@gmail.com</a> | Cell: <a value="+15102079976">510-207-9976</a> | There you are</div><br></div></div>