this post was submitted on 13 Nov 2024
0 points (NaN% liked)

ActivityPub

0 readers
1 users here now

Focused discussion related to ActivityPub integration in NodeBB

founded 6 months ago
 

Let's say for some contrived (but very real) reason, I want to add { "toot": "http://joinmastodon.org/ns#", "Emoji": "toot:Emoji" } to @context, but another member of @context might be { "toot": "http://joinmastodon.org/ns#", "focalPoint": ... }

Would it be acceptable if I just pushed my object to the end and assumed that JSON-LD parsers would correctly reduce it down to:

{
  "toot": "http://joinmastodon.org/ns#",
  "Emoji": "toot:Emoji",
  "focalPoint": ...
}

... or should I be adding in logic to detect the existing member defining toot and merge the Emoji property in?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 2 months ago (1 children)

@julian depends on if your property conflicts with any other defined properties. (see the schema.org problem)

[โ€“] [email protected] 0 points 2 months ago

@[email protected] let's assume no. Only common property is toot.

I just want to make sure it's not going to make fedify or smithereen throw errors when it tries to parse my janky @context.