Partially embedded objects

Sometimes object is not embedded fully and only a few of its properties are included. One example of this practice can be found in FEP-400e which requires objects on a wall to have a target property that contains an “abbreviated collection object”.

The mechanism of partial embeddings can be useful, but it is currently underspecified. How consuming implementation can tell if the object is full or abbreviated? I think it can be done using a new property, partial.

Example:

{
  "id": "https://social.example/announce",
  "type": "Announce",
  "object": {
    "id": "https://social.example/like",
    "type": "Like"
    "partial": true
  }
}

This FEP-1b12 activity is easy to parse because the type of object is known. At the same time, there’s no ambiguity regarding full / partial embedding. The recipient of this activity would know that object must be fetched.

1 Like

Well, if you go strictly by the open-world assumption, every object is considered partially embedded by default. The obvious example of this is IRI string values for "@type": "@id" terms, which are mere syntax sugar for { "@id": "https://example.com/foo" }. But yes, that’s not quite a practical interpretation.

I think the problem is applicable to any JSON-LD use cases. So I wonder if there is a prior art for this by the JSON-LD people.

3 Likes