You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently in the process of implementing relay support in hollo. In the process of testing I noticed that this project doesn't accept spec conform Activity objects. After I added some logging to the relay software, I was able to pin it down to the Activity model.
json: cannot unmarshal string into Go struct field Activity.to of type []string
The Activity Streams 2.0 Vocabulary defines the to property as having a range of Object. In JSON-LD, properties defined with a range of Object can accept either a single object or an array of objects. This means that the to property can be serialized as either a single IRI or an array of IRIs, depending on the context. This is why fedify implements it this way.\
Hi,
I am currently in the process of implementing relay support in hollo. In the process of testing I noticed that this project doesn't accept spec conform Activity objects. After I added some logging to the relay software, I was able to pin it down to the Activity model.
json: cannot unmarshal string into Go struct field Activity.to of type []string
A single string is a valid value for
to
according to https://www.w3.org/TR/activitystreams-vocabulary/#dfn-toThe Activity Streams 2.0 Vocabulary defines the to property as having a range of Object. In JSON-LD, properties defined with a range of Object can accept either a single object or an array of objects. This means that the to property can be serialized as either a single IRI or an array of IRIs, depending on the context. This is why fedify implements it this way.\
An object like this should work just fine:
The text was updated successfully, but these errors were encountered: