WordPress and 844e
-
Hi pfefferle@mastodon.social, I was just curious why activitypub.blog@activitypub.blog was a user and not a group on NodeBB, so I checked out its AP representation on BrowserStack.
This stood out:
... "generator": { "type": "Application", "implements": { "href": "https://datatracker.ietf.org/doc/html/rfc9421", "name": "RFC-9421: HTTP Message Signatures" } }, ...I thought "how would you be able to represent multiple implementations if
implementsis an object?It looks like it is supposed to be an array, according to FEP 844e.
As an aside, I guess not all WP actors are groups? I feel like we've had this conversation before though hehe.
-
System shared this topic on
-
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.