- From: Adam Sobieski <adamsobieski@hotmail.com>
- Date: Sat, 28 Feb 2026 05:34:03 +0000
- To: Roman Evstifeev <someuniquename@gmail.com>
- CC: "public-json-ld@w3.org" <public-json-ld@w3.org>
- Message-ID: <DS4PPF69F41B22E1F287844E8FF2450FEFCC570A@DS4PPF69F41B22E.NAMP223.PROD.OUTLOOK.C>
Roman,
All,
Thank you. SHACL makes sense for constraining and validating merge results.
Brainstorming about how best to refer to SHACL resources from schemas, if there isn't already a best practice or technique, perhaps, drawing inspiration from HTML's "<meta>" and "<link>" elements, schema authors could express something resembling:
"ext:metadata": [{
"@type" : "ext:Link",
"ext:rel": "ext2:validation",
"ext:type": "text/turtle",
"ext:href": "https://example.org/shacl/constraints.ttl"
}]
Best regards,
Adam
________________________________
From: Roman Evstifeev <someuniquename@gmail.com>
Sent: Friday, February 27, 2026 10:20 PM
To: Adam Sobieski <adamsobieski@hotmail.com>
Cc: public-json-ld@w3.org <public-json-ld@w3.org>
Subject: Re: Graph Merging Algorithms and JSON-LD Schemas
If you want automated consistency check, have a look at shacl. It lets you formally define and verify desired shape of the resulting graph after merge. For instance, the rule sh:maxCount 1 ; set on property will ensure that it can't have two different values.
On Sat, Feb 28, 2026, 01:33 Adam Sobieski <adamsobieski@hotmail.com<mailto:adamsobieski@hotmail.com>> wrote:
JSON-LD Community Group,
With respect to merging JSON-LD documents, two at a time, should JSON-LD schemas be able to express per-property rules or hints to override default merging-algorithm behaviors?
In many cases, properties each having a single value could be merged into arrays with two elements. In many cases, values and arrays could be concatenated, treating values as singleton arrays. In many cases, arrays could be simply concatenated.
For some Boolean properties, however, developers might want to be able to indicate that these properties' values could only be merged if two documents' values were identical, to avoid a property having both a "true" and "false" value in a merge result. One might want to be able to define, using JSON-LD schema, that a merging algorithm should throw an error if two distinct values were being merged for a certain property.
What do you think about being able to specify per-property rules or hints for JSON-LD graph-merging algorithms, being able to override default algorithm behavior, being able to indicate if and when to throw errors, using JSON-LD schemas?
Best regards,
Adam Sobieski
P.S.: Motivating use cases include developers being able to provide inline or URL-addressed JSON-LD data in security-related (e.g., access-control-related) attributes, annotations, and decorators on functions and methods. As envisioned, JSON-LD content could be merged together from multiple decorators' metadata, into the resultant metadata for a function or method...
@mcp_tool('foo')
@metadata(fetch('https://example.org/security/category-1.jsonld'))
@metadata(fetch('https://example.org/security/resource-use-3.jsonld'))
foo(...)
{
...
}
Received on Saturday, 28 February 2026 05:34:09 UTC