driebit / ginger

Ginger: awesome semantic CMS built on Zotonic
http://ginger.nl
Apache License 2.0
29 stars 9 forks source link

[rdf] Fix JSON-LD type serialization #658

Closed ddeboer closed 4 years ago

ddeboer commented 4 years ago

We used to produce JSON-LD documents like:

"@type": {
    "@id": "http://..."
}

However, this doesn't validate against https://json-ld.org/playground/, so change it to:

"@type": ["http://..."]

which does validate.

rl-king commented 4 years ago

@ddeboer We're about to tag a new release and while reviewing the changes we were wondering what impact of this change is to existing code. Won't all code expecting the existence of "@id" break?

ddeboer commented 4 years ago

Hey @rl-king! You’re right, this is definitely a BC break. In practice:

rl-king commented 4 years ago

👍 thanks for the quick response!