Re: JSON-LD Framing

That looks like a bug in jsonld.js; as you specify `”givenName”: “John”, it should only match the first record (with or without `@requireAll`). It works properly in my implementation [1].

Gregg Kellogg
gregg@greggkellogg.net

[1] http://rdf.greggkellogg.net/distiller?command=frame&format=jsonld&output_format=jsonld

> On Feb 28, 2019, at 10:55 PM, Angelo Veltens <angelo.veltens@online.de> wrote:
> 
> 
> 
> Am 27.02.19 um 22:51 schrieb Robert Sanderson:
>> 
>> 
>> On Wed, Feb 27, 2019 at 12:52 PM Dave Longley <dlongley@digitalbazaar.com <mailto:dlongley@digitalbazaar.com>> wrote:
>> 
>> > I’m +1 for saying that `@requireAll` requires both `@type` and all other
>> > stated properties to be present (along with @id, if it’s there too).
>> +1
>> 
>> +1 as well.  I'll raise the issue on the framing github repo.
> 
> +1. But even without using @type I am getting results I would not expect. When framing for "givenName": "John", I also get Jane within the result:
> 
> https://json-ld.org/playground/#startTab=tab-framed&json-ld=%7B%22%40context%22%3A%7B%22%40version%22%3A1.1%2C%22%40vocab%22%3A%22https%3A%2F%2Fschema.org%2F%22%7D%2C%22%40graph%22%3A%5B%7B%22%40id%22%3A%221%22%2C%22%40type%22%3A%22Person%22%2C%22name%22%3A%22John%20Doe%22%2C%22givenName%22%3A%22John%22%2C%22familyName%22%3A%22Doe%22%7D%2C%7B%22%40id%22%3A%222%22%2C%22%40type%22%3A%22Person%22%2C%22name%22%3A%22Jane%20Doe%22%2C%22givenName%22%3A%22Jane%22%7D%5D%7D&frame=%7B%22%40context%22%3A%7B%22%40version%22%3A1.1%2C%22%40vocab%22%3A%22https%3A%2F%2Fschema.org%2F%22%7D%2C%22%40requireAll%22%3Atrue%2C%22givenName%22%3A%22John%22%7D <https://json-ld.org/playground/#startTab=tab-framed&json-ld=%7B%22%40context%22%3A%7B%22%40version%22%3A1.1%2C%22%40vocab%22%3A%22https%3A%2F%2Fschema.org%2F%22%7D%2C%22%40graph%22%3A%5B%7B%22%40id%22%3A%221%22%2C%22%40type%22%3A%22Person%22%2C%22name%22%3A%22John%20Doe%22%2C%22givenName%22%3A%22John%22%2C%22familyName%22%3A%22Doe%22%7D%2C%7B%22%40id%22%3A%222%22%2C%22%40type%22%3A%22Person%22%2C%22name%22%3A%22Jane%20Doe%22%2C%22givenName%22%3A%22Jane%22%7D%5D%7D&frame=%7B%22%40context%22%3A%7B%22%40version%22%3A1.1%2C%22%40vocab%22%3A%22https%3A%2F%2Fschema.org%2F%22%7D%2C%22%40requireAll%22%3Atrue%2C%22givenName%22%3A%22John%22%7D>
> I cannot imagine a use case for this. If it is intentionally, what is the reasoning behind that behaviour?
> 
> Best regards,
> Angelo
> 
> <pEpkey.asc>

Received on Friday, 1 March 2019 21:41:51 UTC