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: one advantage of "collection not typed, members typed"

In open issue #5, we're leaning toward option 2.

However I found one use case where option 1 works better.
That use case is mapping any arbitrary JSON structure to XDI.
This could be useful when implementing XDI connectors for external APIs that are based on JSON.


Currently, the following example JSON structure:

    "firstName": "John",
    "lastName": "Smith",
    "age": 25,
    "address": [
        "91 Western Road, Brighton, East Sussex, England, BN1 2NW",
            "streetAddress": "21 2nd Street",
            "city": "New York",
            "state": "NY",
            "postalCode": "10021"

Could be mapped to XDI as follows:


This is possible, because the $(+(address)) collection can have one attribute member and one entity member at the same time.

With the proposed change to option 2, this would no longer be possible (or be more difficult).
I think then the way to do it would be to have TWO collections, i.e. one attribute collection and one entity collection, but I am not sure if that is very clean.

Therefore, although initially I also preferred option 2, I think for me this is reason enough to now switch to option 1.


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