hrefna,
@hrefna@hachyderm.io avatar

Yes, I am probably going to be ranting about the union type problem in #ActivityPub/ #JsonLD more than usual at least until I get this serialization pattern worked out…

…or until I decide to just chuck it all out of the window and only write or accept one format.

hrefna,
@hrefna@hachyderm.io avatar

So far in my evaluation no one, of any size service, handles all of this correctly.

I don't seem to be alone in this analysis, either: https://www.stevebate.net/nothin-implements-activitypub/

Serious question: are there any projects out there that:

  1. implement all of this—including things like handling multiple actors or multiple inReplyTo links/objects/lists/etc
  2. correctly
  3. with tests

Ideally would be one that also does this without needing to parse it "in #JsonLD"

?

jenniferplusplus,
@jenniferplusplus@hachyderm.io avatar

@hrefna not to my knowledge. I'm also working on it. Coauthorship is a big wishlist item for me.

joelving,
@joelving@mastodon.joelving.dk avatar

@hrefna
How do you understand it when the AS2-spec says a thing can be "Link or Object"? Object is an object (duh), but so is Link (with href properties and such). And then there's URIs. And often optional multiplicity (single value vs collection). Do we really have four (!) potential target types for deserialization?

hrefna,
@hrefna@hachyderm.io avatar

@joelving It gets worse. There's an Object type Collection.

Which can contain a list of items, but it could also contain a CollectionPage. https://www.w3.org/TR/activitystreams-core/#collections

hrefna,
@hrefna@hachyderm.io avatar

@joelving Basically, to represent one object, I think these are all valid:

{
type: Obj etc
}

  1. [{ type: Obj etc}]

  2. {href etc}

  3. [{href etc}]

  4. <uri>

  5. [<uri>]

  6. {Collection, items: [{type: Obj etc]}]}

  7. {Collection, items: [{href etc}]}

  8. {Collection, items: [<uri>]}

  9. {Collection, CollectionPage, first: [{type: Obj etc}]

  10. {OrderedCollection, items: [{type: Obj etc]}]}

etc etc etc, not getting into additional nesting that you could do as well.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • fediverse
  • DreamBathrooms
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • ethstaker
  • JUstTest
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • tacticalgear
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • provamag3
  • lostlight
  • All magazines