jsonld
jsonld copied to clipboard
dev version breaks compaction against a url
The following works for me on the CRAN version but not the dev version:
library("jsonld")
# Example from https://github.com/digitalbazaar/jsonld.js#quick-examples
doc <- '{
"http://schema.org/name": "Manu Sporny",
"http://schema.org/url": {"@id": "http://manu.sporny.org/"},
"http://schema.org/image": {"@id": "http://manu.sporny.org/images/manu.png"}
}'
# Compact given a url to a context:
out <- jsonld_compact(doc, "http://purl.org/codemeta/2.0")
I wonder if this is related to 9281d4b8adeaaccc98d81cfff47977ae8b80432e . I'm thinking that turning content negotiation off might not be a good idea since it seems the basic json-ld algorithms rely on content negotiation as I comment in https://github.com/ropensci/codemetar/issues/34. But the above fails for me with even the default setting in the dev version, so I think is a bug(?)