In V2 we are tightening verification and check for added values not mapped to JSON-LD. This is done by adding a fallback context and determining if any fields were added. This is done in other projects, but the swift jsonld libraries are unclear. Needs more time/investigation, so opening an issue to track.
Starting code here, but didn't get far.
guard let currentContext = json["@context"] as? [AnyObject] else {
self.state = .failure(reason: "Failed JSON-LD normalization; could not find @context")
return
}
let fallbackContext : [String: Any] = [
"@vocab": "http://fallback.org/"
]
var newContext = Array(currentContext)
newContext.append(fallbackContext as AnyObject)
json["@context"] = newContext