OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: JSON-XD (was Re: [xdi] NO XDI TC TELECON MONDAY JUNE 6)


I agree JSON-XD is worth pursuing and should help to make XDI more accessible.

Few comments:

1. In your example you have this:

{
  "$context": {
    "name": "#name",
    "homepage": {
      "$id": "#homepage",
      "$type": "$iri"
    }
  },
  "$id": "=!:uuid:33ad7beb-1abc-4a26-b892-466df4379a51",
  "$type": "#person",
  "name": "John Smith",
  "homepage": "http://www.example.com/"
}

I am wondering if you accidentally left out the < > brackets, i.e. should it be as follows:

{
  "$context": {
    "name": "<#name>",
    "homepage": {
      "$id": "<#homepage>",
      "$type": "$iri"
    }
  },
  "$id": "=!:uuid:33ad7beb-1abc-4a26-b892-466df4379a51",
  "$type": "#person",
  "name": "John Smith",
  "homepage": "http://www.example.com/"
}

Or did you omit them on purpose and would you expect a parser to "guess" them?

2. I think you could also add an entry to the $context that defines a term for #person:

{
  "$context": {
    "person": "#person",
    "name": "<#name>",
    "homepage": {
      "$id": "<#homepage>",
      "$type": "$iri"
    }
  },
  "$id": "=!:uuid:33ad7beb-1abc-4a26-b892-466df4379a51",
  "$type": "person",
  "name": "John Smith",
  "homepage": "http://www.example.com/"
}
Not sure if this actually improves or reduces readability, but in analogy to JSON-LD it should be allowed.

3. It would be useful to also have an example of how XDI relations are represented in JSON-XD. I imagine it would look like this:

{
  "$context": {
    "friend": {
      "$id": "#friend",
      "$type": "$id"
    }
  },
  "$id": "=!:uuid:33ad7beb-1abc-4a26-b892-466df4379a51",
  "$type": "#person",
  "friend": "=!:uuid:0a81d660-722d-4827-b80a-2c9e67ada041"
}

(Similar to JSON-LD, the value of "friend" could be either just a string or an array of strings.)

4. I wrote a quick experimental parser for this, see here:

https://server.xdi2.org/XDIConverter?sample=8

5. I also tried to do an example of an XDI message serialized in JSON-XD and posted it to the discussion page:

https://wiki.oasis-open.org/xdi/JsonXdiMapping/Discussion

6. There are probably a few more details to figure, especially around peer and inner roots, but I think this is a great start.

Markus

On 06/06/2016 08:58 AM, =Drummond Reed wrote:
Although it's been a month since we've been able to hold a telecon, that's what happens during the "identity conference season". I just arrived in New Orleans for Cloud Identity Summit 2016, and our regular TC meeting tomorrow morning conflicts with the start of the conference, so I won't be able to attend.

I suggest we finally convene next Monday June 13, for which I hope none of us have conflicts.

In the meantime, I have updated the page on JSON-XDI Mapping to call the proposed format JSON-XD (instead of JSON-XDI) so it aligns with JSON-LD, and to add some more notes about this proposed format for mapping JSON documents into XDI. My experience in talking with Manu Sporny, JSON-LD editor, and others over the past few months have convinced me that we need JSON-XD more than ever. In fact adoption of XDI may depend on their being a developer-friendly format like JSON-XD.

I'd like to discuss this on next week's call. In the meantime, please send in any other agenda suggestions.

Best,

=Drummond  



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]