Embedding a plain JSON node in a JSON-LD document

Hi,

We have a bit of a challenge with some of the resources that we are
exposing over the Web using REST services. We strive to return all
responses as JSON-LD documents, but the structure of some  document
sections is not determined upfront, which means we can't build JSON-LD
context for such documents. Currently we are returning them as plain JSON
documents, but we would like to do better than that. Consider the following
document:

{
  firstName: "John",
  lastName: "Smith",
  dateOfBirth: "1970/03/12",
  additionalInfo: {
    favouriteSoccerClub: "soccer"
  }
}

In the document above "firstName", "lastName", "dateOfBirth" represent
information with defined context, so it can be returned in a JSON-LD
response. But "favouriteSoccerClub" is a part of a property bag with items
added ad-hoc, so they can't be semantically described. Is it possible to
expose such document as JSON-LD with "additionalInfo" embedded as some kind
of CLOB but in a JSON format, so "additionalInfo" would still be a valid
JSON node?

Thanks in advance

Vagif

Received on Monday, 5 May 2014 12:14:06 UTC