Closed cjslep closed 2 months ago
the latter, I believe
On Sat, Apr 28, 2018, 10:50 AM Cory J Slep notifications@github.com wrote:
In the paragraph describing this, it states (emphasis mine):
For client to server interactions, updates are partial; rather than updating the document all at once, any key value pair supplied is used to replace the existing value with the new value. This only applies to the top-level fields of the updated object. A special exception is for when the value is the json null type; this means that this field should be removed from the server's representation of the object.
What is the exception referring to?
- Only applying to top-level fields of the updated object. Therefore, you can remove subfields. Note this is the track I wound up going down in go-fed/activity.
- Replacing a value. Instead of replacing it with null, it should just be deleted. This seemed too obvious to be an exception to me; hence I went for the first interpretation.
Given my track record at misinterpreting the intentions of the spec, I figured I should ask here.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/w3c/activitypub/issues/303, or mute the thread https://github.com/notifications/unsubscribe-auth/AAORV1Us9nqWDarAPZhzC3LwmKcRWwXMks5ttIGigaJpZM4TrcGv .
I think the sentence is pretty clear: ''A special exception is for when the value is the json null type''. I don't know if there's a way to make this clearer. I realize that it seems obvious, but it's the only way to delete a property using this technique.
I think the bigger problem is that properties with null values are elided out of JSON-LD compaction, which means this feature is not very compatible with JSON-LD and the compaction requirements in AS2. I believe we have another issue open for that, so I'm going to recommend just closing this.
The other issue is #396 but it appears to have been closed without comment
properties with null values are elided out of JSON-LD compaction
Note that there is a difference between "properties with a value of NULL" and "properties with no value", either of which might be meant by "properties with null values". The latter conveys no information in the worlds of JSON-LD and RDF, and thus is eligible for elision during compaction; the former may convey some information, and thus SHOULD be retained.
In the paragraph describing this, it states (emphasis mine):
What is the exception referring to?
Given my track record at misinterpreting the intentions of the spec, I figured I should ask here.