{"id":4961,"date":"2016-03-14T16:43:15","date_gmt":"2016-03-14T20:43:15","guid":{"rendered":"http:\/\/www.dr-chuck.com\/csev-blog\/?p=4961"},"modified":"2016-03-14T18:11:00","modified_gmt":"2016-03-14T22:11:00","slug":"an-ims-proposal-eliminate-all-use-of-json-ld","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2016\/03\/an-ims-proposal-eliminate-all-use-of-json-ld\/","title":{"rendered":"An IMS Proposal &#8211; Eliminate all use of JSON-LD"},"content":{"rendered":"<p>I sent the following message to IMS because I am really unhappy with IMS use of the JSON-LD in our JSON-based specifications.  Apologies in advance to the fans of RDF.  We all hoped that JSON-LD would give us the best of both worlds &#8211; but it seems like it is the worst of all worlds.  I don&#8217;t expect to win this argument &#8211; because the people making the decisions are not the people writing the code and feeling the unneeded pain caused by JSON-LD. <\/p>\n<p>Hi all,<\/p>\n<p>I would like to formally propose that we no longer use JSON-LD in any IMS specification going forward.  I would like to also propose that we formally standardize prefixes for all specifications we have issued that use JSON-LD so implementations can legitimately parse our data models using JSON reliably.  <\/p>\n<p>Furthermore we would alter certifications for JSON-LD specs to generate and accept JSON instead of JSON-LD.<\/p>\n<p>My reasoning is that we are far outside the norm of the modern-day REST web services world &#8211; and while there are fans of JSON-LD &#8211; they are the same folks that loved RDF and just found a new place to push their ideas.<\/p>\n<p>Our standards are one domain of interest and our use of JSON-LD actually tends to create silos of data models.   If we compare the JSON-LD for LTI 2.0 and the JSON-LD for ContentItem &#8211; they are completely distinct namespaces and things like the &#8220;contact&#8221; structure &#8211; which *should be the same* are actually completely different &#8211; and our dysfunctional use of JSON-LD *discourages* the sharing of data model elements between different specifications.<\/p>\n<p>And if you take a look at CASA using JSON Schema &#8211; it is even worse.   Simple things like contact information again are given completely different data models.<\/p>\n<p>And as I am starting to write code that crosses these spec boundaries boundaries, I am finding that it is far less important to have globally unique identifiers for the notion of a contact data structure &#8211; but instead a way to have a contact data structure that we can share and reuse across many specifications.<\/p>\n<p>I think that the right approach is to go straight to a namespaced OO approach to model our underlying data objects and then when we build a new spec and want to pull in the org.imsglobal.shared.Contact object &#8211; we just pull in the object and then the JSON serialization is obvious.<\/p>\n<p>As we move away from document-styled specs to API-styled specs &#8211; it would seem like we just should move towards defining our interoperable data formats in a way that makes the development of APIs very simple and straightforward instead of wasting so much effort to achieve some dream of future RDF nirvana.<\/p>\n<p>I now have samples of how I model these JSON documents across services &#8211; and I can tell you that (a) we are woefully inconsistent across our specs and JSON-LD is partially *causing* the problem and (b) anything that has to do with properly parsing JSON-LD is really poor given the lack of real toolset support and (c) it is frustrating the increasing way that the certification suites are making slightly harder by randomly throwing in JSON-LD just to break those who just want to parse JSON &#8211; the solution is to reverse engineer the certification patterns and build lame JSON parsers instead of really using JSON-LD tool chains.<\/p>\n<p>It is high time to walk away from JSON-LD going forward.<\/p>\n<p>Looking forward to your comments.<\/p>\n<p>\/Chuck<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I sent the following message to IMS because I am really unhappy with IMS use of the JSON-LD in our JSON-based specifications. Apologies in advance to the fans of RDF. We all hoped that JSON-LD would give us the best of both worlds &#8211; but it seems like it is the worst of all worlds. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4961","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/4961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=4961"}],"version-history":[{"count":2,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/4961\/revisions"}],"predecessor-version":[{"id":4963,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/4961\/revisions\/4963"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=4961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=4961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=4961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}