wordproof / timestamp-standard

GNU General Public License v3.0
7 stars 2 forks source link

Abolish property contentUrl to use property supporting urn, url and uri #6

Open StephanMeijer opened 3 years ago

StephanMeijer commented 3 years ago

Not all content should and would be on a HTTP server in real life. URIs and URNs in general should be supported including but not limited to:

I therefore propose to replace the following attributes:

{
  ...
  "contentHash": "8C9453EF2C0C6F2F94104D16FF0A8105BC6C9793D926457839D8BCADE0888342",
  "contentUrl": "https://test.com/image.png",
  ...
}

With the following:

{
    ...
    "content": {
        "hash": "8C9453EF2C0C6F2F94104D16FF0A8105BC6C9793D926457839D8BCADE0888342",
        "location": {
            "type": "url",
            "identifier": "https://test.com/image.png"
        }
    }
    ...
}

Where $.content.location.type can be any of "url", "urn" or "uri".

Or alternatively:

{
    ...
    "contentHash": "8C9453EF2C0C6F2F94104D16FF0A8105BC6C9793D926457839D8BCADE0888342",
    "contentLocation": {
        "type": "url",
        "identifier": "https://test.com/image.png"
    }
    ...
}

Where $.contentLocation.type can be any of "url", "urn" or "uri".

StephanMeijer commented 3 years ago

We could change the type of the content.location or contentLocation-property also to be an Array, so we can refer to the same object stored at multiple locations.

You would then have the following:

{
    ...
    "content": {
        "hash": "8C9453EF2C0C6F2F94104D16FF0A8105BC6C9793D926457839D8BCADE0888342",
        "location": [
            {
                "type": "url",
                "identifier": "https://test.com/image.png"
            }
        ]
    }
    ...
}

Or alternatively:

{
    ...
    "contentHash": "8C9453EF2C0C6F2F94104D16FF0A8105BC6C9793D926457839D8BCADE0888342",
    "contentLocation": [
        {
            "type": "url",
            "identifier": "https://test.com/image.png"
        }
    ]
    ...
}
marijnbent commented 3 years ago

Hi Stephan, Thanks for staying so close to the Schema.org terminology, that helps a lot! Interesting suggestions, would love to hop on a call with you to discuss some of these changes.