digitalbazaar / jsonld.js

A JSON-LD Processor and API implementation in JavaScript
https://json-ld.org/
Other
1.66k stars 195 forks source link

Fix for: Framing does not respect specified value #300 #373

Closed michaelcpuckett closed 4 years ago

michaelcpuckett commented 4 years ago

This fixes #300 to match behavior in RDF Distiller.

Expected Behaviour: Given a document with 2 persons "Jane" and "John" and a frame for "givenName": "John" I expect the result to contain only John, but not Jane.

Actual Behaviour: The result contains both persons, just that Janes givenName is set to null

This removes the initial check on the node to see if it has any properties and falls through to check the node to see if the values match.

I added a test based on the issue.

michaelcpuckett commented 4 years ago

I see this is failing some tests. I didn't run fetch-test-suites first. I'll keep looking into it, but closing for now.