Given this context, registered as "http://myproject.com/definitions/v1/models/partnerships":
{
"@context": {
"@vocab": "http://myproject.com/definitions/v1/types#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"state": {
"@id": "partnershipState"
},
"type": {
"@id": "partnershipType"
},
"issuerId": {
"@id": "issuer"
},
"partnerId": {
"@id": "partner"
}
}
}
After flattening using the mentioned context
BASE = "http://myproject.com/definitions/v1/models/";
JsonLdOptions jsonLdOpts = new JsonLdOptions();
String type = "partnerships";
jsonLdOpts.setProcessingMode(JsonLdOptions.JSON_LD_1_1);
Object flattened = JsonLdProcessor.flatten(jsonObject, BASE + type, jsonLdOpts);
the resutling document contains broken context:
"@context" : {
"@vocab" : "http://myproject.com/definitions/v1/types#",
"xsd" : "http://www.w3.org/2001/XMLSchema#",
"state" : "partnerId:shipState",
"type" : "partnerId:shipType",
"issuerId" : "http://myproject.com/definitions/v1/types#issuer",
"partnerId" : "http://myproject.com/definitions/v1/types#partner"
}
Looks like the JSON-LD processor replaces "partner" in "partnershipState" with "partnerId:", resulting in "partnerId:shipState"
I'm using jsonld-java:0.12.3
Thanks
Given this context, registered as "http://myproject.com/definitions/v1/models/partnerships":
After flattening using the mentioned context
the resutling document contains broken context:
Looks like the JSON-LD processor replaces "partner" in "partnershipState" with "partnerId:", resulting in "partnerId:shipState"
I'm using jsonld-java:0.12.3
Thanks