{"id":1024,"date":"2017-06-13T16:15:56","date_gmt":"2017-06-14T00:15:56","guid":{"rendered":"https:\/\/accretiondisc.com\/blog\/?p=1024"},"modified":"2017-06-13T16:30:54","modified_gmt":"2017-06-14T00:30:54","slug":"dodged-the-xml-bullet","status":"publish","type":"post","link":"https:\/\/accretiondisc.com\/blog\/2017\/06\/13\/dodged-the-xml-bullet\/","title":{"rendered":"Dodged the XML bullet"},"content":{"rendered":"<p>Years ago, when XML was the new hotness, I kept meaning to learn it. (I mean, I learned it, except the headers and <a href=\"https:\/\/stackoverflow.com\/questions\/2784183\/what-does-cdata-in-xml-mean\">CDATA<\/a>, but I never figured out how to use <a href=\"https:\/\/www.w3.org\/TR\/xpath\/\">XPath<\/a> or <a href=\"https:\/\/www.w3.org\/TR\/xquery\/\">XQuery<\/a> or\u00c2\u00a0<a href=\"https:\/\/www.w3.org\/Style\/XSL\/\">XSLT<\/a> or do anything useful with it. I learned just enough to write a toolchain that emits an RSS feed that iTunes is happy with and stopped there. <a href=\"https:\/\/www.w3.org\/People\/Raggett\/tidy\/\">Tidy<\/a> is your friend.)<\/p>\n<p>Maybe I dodged a bullet. The other day Manton Reece and Brent Simmons came up with <a href=\"https:\/\/jsonfeed.org\/version\/1\">JSON Feed<\/a>, a replacement (or at least an alternative to) Atom and RSS. Suits me. I prefer <a href=\"https:\/\/en.wikipedia.org\/wiki\/YAML\">YAML<\/a> to <a href=\"https:\/\/en.wikipedia.org\/wiki\/JSON\">JSON<\/a>, but I&#8217;d take either one over XML even if I could only see them upside down in a mirror.<\/p>\n<p>It&#8217;s not there any more, but in their first announcement (<a href=\"https:\/\/www.jordanmerrick.com\/posts\/json-feed\/\">quoted here<\/a>), Reese and Simmons committed a gaffe and said what they thought:<\/p>\n<blockquote><p>developers will often go out of their way to avoid XML. JSON is simpler to read and write, and it\u00e2\u20ac\u2122s less prone to bugs.<\/p><\/blockquote>\n<p>Duh. But the rationale they state now is still true, if a little less transparent.<\/p>\n<p>While I&#8217;m thinking about it: a pet peeve. RSS says that <code>&lt;pubDate&gt;<\/code> wants an <a href=\"https:\/\/www.w3.org\/Protocols\/rfc822\/#z28\">RFC 822 compliant timestamp<\/a> for feeds, but good luck if you&#8217;re in Alaska, which is part of the US not in the big four time zones. (Use Zulu <code>-0900<\/code> instead.)<\/p>\n<p>Updated. More <a href=\"https:\/\/wptavern.com\/json-feed-creators-aim-to-revitalize-interest-in-the-open-web-with-rss-alternative\">brutal honesty<\/a>:<\/p>\n<blockquote><p>Reece and Simmons decided the time was right to build an updated syndication format, as more and more developers are refusing to work with XML.<\/p>\n<p>\u00e2\u20ac\u0153I believe that developers (particularly Mac and iOS developers, the group I know best) are so loath to work with XML that they won\u00e2\u20ac\u2122t even consider building software that needs an XML parser,\u00e2\u20ac\u009d Simmons said. \u00e2\u20ac\u0153Which says to me that JSON Feed is needed for the survival of syndication.\u00e2\u20ac\u009d<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Years ago, when XML was the new hotness, I kept meaning to learn it. (I mean, I learned it, except the headers and CDATA, but I never figured out how to use XPath or XQuery or\u00c2\u00a0XSLT or do anything useful with it. I learned just enough to write a toolchain that emits an RSS feed [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[52],"tags":[964,960,961,965,966,963,956,957,958,959,962],"class_list":["post-1024","post","type-post","status-publish","format-standard","hentry","category-technology","tag-atom","tag-cdata","tag-json","tag-json-feed","tag-rfc822","tag-rss","tag-xml","tag-xpath","tag-xquery","tag-xslt","tag-yaml"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paRqpr-gw","_links":{"self":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/1024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/comments?post=1024"}],"version-history":[{"count":0,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/1024\/revisions"}],"wp:attachment":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/media?parent=1024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/categories?post=1024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/tags?post=1024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}