-
Notifications
You must be signed in to change notification settings - Fork 92
Description
#396 was closed without resolution, so I'm reopening discussion of the unsolved issue.
ActivityPub:
when the value is the json null type; this means that this field should be removed from the server's representation of the object.
The issue is that JSON-LD processing will remove the null-valued property. This make the null-valued property ineffective as a "remove property" instruction.
I'm unsure about how to address this issue. Clearly, at least some JSON-LD tools will elide out null values, so a processor using one of those tools will not receive the "null" versions.
One possible way to thread the needle is to treat the
Updateobject not as content per se, but as a delta on the content, which doesn't necessarily need to match the JSON-LD process, but could be plain old JSON.I think the next step may be an Erratum, or a note in the Primer about this issue and perhaps others with JSON-LD processing, and perhaps a future change to the specification that may allow other values in the Update object, or even a completely different activity (
Patch, maybe?).
i would say that making c2s and s2s behavior consistent is the best option we have. partial updates always felt like a bit of a hack, as if you miss some partial updates, you will almost certainly end up with an object state that doesn't represent any valid object revision. with full updates, if you miss some updates, you will at least have some valid revision of the object. therefore, i think we should consider an errata and also consider deprecating this functionality. even right now, clients would theoretically not be able to guarantee that a partial update will work as expected, so the primer should probably caution against using this mechanism as well.
summary
- Needs Primer: explain the issue with C2S "partial update" and caution against its usage
- Needs Errata: note in the spec that this behavior is incompatible with JSON-LD and AS2
- Next Version: consider deprecating this functionality entirely for above reasons (making c2s and s2s consistent, ensuring that Updates leave the object in a consistent state)
Cross-tagging: