[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:
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]