Activity Streams/Primer/Cardinality of properties
Many of the properties defined in the Activity Streams 2.0 vocabulary can technically have 1 or more values.
However, in practice, they may not be well-supported by other software. In part, this is because of the semantics of the property. In addition, the language and examples of the specification might suggest that only a singular value would make sense.
In this document, we'll address properties that are technically allowed to have multiple values, but may not be common.
Properties
object
The object
property is defined as describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added.
The text describing object
is often singular. There are 73 examples of object
in the AS2 Vocabulary document; only one uses multiple values.
For publishers, it is risky to assume that consumers will be able to process multiple values in this important property. Therefore, it might be better to separate an activity with multiple objects into multiple activities with a single object, if the domain allows.
There may be some domains where using one object
and a separate target
may make sense. For example, if you use a theoretical Glue
extension activity, which represents gluing its two object
values together, it may make sense to remodel this as gluing one value as object
to another value as target
.
For consumers, be prepared to handle multiple values in the object
property. If you're unable to process multiple values, it may be better to simply ignore or discard the activity, rather than interfering with the semantics by discarding one object
.