Hi Williams,

thanks again for the quick reply. I'll check how that might look like in a specification.

While the information model here is independent of the serialization/encoding, I am not sure how to deal with potential semantic mapping when using JSON-LD. My assumption is that information element names, such as id and comment, would be mapped to the semantics of @comment and @id, respectively, in JSON-LD (if that would be defined). Is that the intend? Otherwise you would, for example, end up with the mandated id and JSON-LD's @id both being members of element, I'd assume.

Viele Grüße,

Henk

On 24.03.21 03:33, William Bartholomew wrote:
Hi Henk, answers below...

1.) Is there an example or a proposal how to express an arc such as
"verifiedUsing" in JSON?

Since hashes are not an element they would typically be serialized as an in-line array, for example:

{
...
"verifiedUsing": [
   {
     "type": "Hash",
     "algorithm": "SHA512",
     "hashValue": "A1B2C3..."
   }
]
}

2.) Is there an example or a proposal how to express an arc, such as
"element", in JSON?

Good question, in the diagram I used the closed diamond shape which is composition, however, now that both document and package can contain elements, and they can also stand alone this should be a hollow diamond indicating aggregation instead. Typically this would be serialized something like this:

{
   "elements": [
     {
       "type": "File",
       "id": "some-id-a"
     },
     {
       "type": "File",
       "id": "some-id-b"
     },
     {
       "type": "Package",
       "id": "some-id-c",
       "elements": [ "some-id-a", "some-id-b" ],
       "rootElements": ["some-id-a"]
   ]
}

3.) Is there still the notion to use json-ld generics here, e.g. object
always include members, such as @comment and @id?

The logical model is indifferent to this. If we define a JSON-LD serialization format for the specification then that would describe how the fields map to JSON-LD constructs.

On Tue, Mar 23, 2021 at 11:50 AM Henk Birkholz <[email protected] <mailto:[email protected]>> wrote:

    Hi William,

    thanks for sending this out!

    Wrt the model illustrated I have three specific questions - all of them
    related to a potential instantiation of that model in JSON:

    1.) Is there an example or a proposal how to express an arc such as
    "verifiedUsing" in JSON?

    2.) Is there an example or a proposal how to express an arc, such as
    "element", in JSON?

    3.) Is there still the notion to use json-ld generics here, e.g. object
    always include members, such as @comment and @id?

    These questions might already have answers. If that is the case, could
    you please point me some resources where these notations are defined or
    corresponding representative examples? The last time, I created an
    exemplary specification from the diagram it looked quite differently
    (e.g. Person was fleshed out in more detail).

    Viele Grüße,

    Henk



    On 23.03.21 19:17, William Bartholomew via lists.spdx.org
    <http://lists.spdx.org> wrote:
     > Attached is the latest diagram from our discussion today.
     >
     >
> >
     >



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#4013): https://lists.spdx.org/g/Spdx-tech/message/4013
Mute This Topic: https://lists.spdx.org/mt/81557642/21656
Group Owner: [email protected]
Unsubscribe: https://lists.spdx.org/g/Spdx-tech/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to