WordPress and 844e
-
May as well ping obenland@mastodon.social while I am at it

-
Every single value is equivalent to an array of a single value in JSON-LD... so these are equivalent:
"implements": { "href": "https://datatracker.ietf.org/doc/html/rfc9421", "name": "RFC-9421: HTTP Message Signatures" }"implements": [{ "href": "https://datatracker.ietf.org/doc/html/rfc9421", "name": "RFC-9421: HTTP Message Signatures" }]So it doesn't need "to be an array", but not making it an array could trip up some clients that are not JSON-LD aware.
-
silverpill@mitra.social the second code example in FEP 844e is wrong though, it uses
[and]instead of{and}around the "object" inimplements -
@thisismissem thanks for your input!
So even if it is not wrong in WordPress, I agree with your consumer example and update the implementation to always use arrays even for single objects.
-
thisismissem said in WordPress and 844e:
> Every single value is equivalent to an array of a single value in JSON-LD... so these are equivalent:Every day I discover another reason to dislike JSON-LD.
-
@silverpill @thisismissem @technical-discussion can you maybe also point the namespace URI to a proper JSON-LD? I had some issues with debugging tools like browser.pub
-
@thisismissem In my FEPs I usually take "JSON-first" approach. Data types are specified because that makes life easier for JSON producers and consumers.
-
@silverpill @thisismissem @technical-discussion can you maybe also point the namespace URI to a proper JSON-LD? I had some issues with debugging tools like browser.pub
@pfefferle The namespace is
https://w3id.org/fep/844e. I copypasted the actor example into JSON-LD playground, it appears to be working. -
@pfefferle The namespace is
https://w3id.org/fep/844e. I copypasted the actor example into JSON-LD playground, it appears to be working.