-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
The graphToRdf function in RDFDataset.java checks whether any of the keys in the JSON document are reserved JSON-LD keywords. As JsonLdUtils.isKeyword() doesn't know of @version (introduced in 1.1), it then tries to interpret its value, which fails.
Solution: add || "@version".equals(key) to the isKeyword function in JsonLdUtils.java:
/**
* Returns whether or not the given value is a keyword (or a keyword alias).
*
* @param v
* the value to check.
* @param [ctx]
* the active context to check against.
*
* @return true if the value is a keyword, false if not.
*/
static boolean isKeyword(Object key) {
if (!isString(key)) {
return false;
}
return "@base".equals(key) || "@context".equals(key) || "@container".equals(key)
|| "@default".equals(key) || "@embed".equals(key) || "@explicit".equals(key)
|| "@graph".equals(key) || "@id".equals(key) || "@index".equals(key)
|| "@language".equals(key) || "@list".equals(key) || "@omitDefault".equals(key)
|| "@reverse".equals(key) || "@preserve".equals(key) || "@set".equals(key)
|| "@type".equals(key) || "@value".equals(key) || "@vocab".equals(key)
|| "@requireAll".equals(key) || "@version".equals(key);
}
Metadata
Metadata
Assignees
Labels
No labels