Gmail, Meet JSON-LD

Another announcement by Google this week – one that didn’t get quite as much play as the launch at I/O of Google Play Music All Access and improvements to its search, map and Google + services – was this: Support for JSON-LD markup in Gmail.

The W3C in April published a Last Call Working Draft for JSON-LD 1.0 (JavaScript Object Notation for Linking Data), a lightweight Linked Data format to give data context. It has been shepherded along for some time by the JSON for Linked Data Community Group.

Manu Sporny, who has been instrumental in JSON-LD’s development and is one of the authors of the draft, heralds the news here in his blog, noting that it means that Gmail now will be able to recognize people, places, events and a variety of other Linked Data objects, and that actions may be taken on the Linked Data objects embedded in an e-mail. “For example, if someone sends you an invitation to a party, you can do a single-click response on whether or not you’ll attend a party right from your inbox. Doing so will also create a reminder for the party in your calendar,” he writes.

The news was greeted with enthusiasm on a W3C JSON LD message round, as, as Sporny describes it, “pretty big validation of the technology.”

While noting that Google followed the standard closely, Sporny does point out some issues with the implementation – including a major one that Google isn’t using the JSON-LD @context parameter correctly in its markup examples:

Because it’s using a text string instead of a URL, he notes, its JSON-LD documents are unreadable by all of the conforming JSON-LD processors today. The fix, he says, is to just add “http://” to the beginning of the “” value, or else JSON-LD processors will have to include a special hack to translate “” to “” just for this use case.

Dan Brickley, developer advocate at Google, commented on the email string that Google can parse this if written @context=", and that it will find a way to document that. He also noted that Google would like to start a conversation about allowing the simpler, shorter form by defaulting to http:// if not present. At last look, the conversation was continuing on the public list, so feel free to check in and stay up to date, as well as read Sporny’s blog for a further discussion of the other issues he’s hoping Google engineers will address.

Writes Sporny, “The JSON-LD community is excited about this development and looks forward to working with Google to improve the recent release of JSON-LD for Gmail.”