Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsonld serialization does not convert rdf:type to @type #169

Open
adlerfaulkner opened this issue Jun 2, 2022 · 2 comments
Open

jsonld serialization does not convert rdf:type to @type #169

adlerfaulkner opened this issue Jun 2, 2022 · 2 comments
Labels
upstream Issue is related to another component then the RMLMapper

Comments

@adlerfaulkner
Copy link

When exectuing a mapping with serialization set to jsonld and with a rr:predicateObjectMap that has rr:predicate rdf:type, the resulting jsonld uses http://www.w3.org/1999/02/22-rdf-syntax-ns#type as a key instead of @type.

For example with the mapping:

<#Mapping> a rr:TriplesMap ;
    rr:logicalSource [ ... ] ;
    rr:subjectMap [
        a rr:SubjectMap ;
        rr:constant "https://example.com/test/id" ] ;
    rr:predicateObjectMap [
        a rr:PredicateObjectMap ;
        rr:predicate rdf:type ;
        rr:objectMap [
            a ns2:ObjectMap ;
            rr:refernece "somejsonfield" ] ] ;

The jsonld I get as response is:

{
    "@id": "https://example.com/test/id",
    "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": [ { "@value": "somejsonfield" } ]
}

I would expect this to give me:

{
    "@id": "https://example.com/test/id",
    "@type": "somejsonfield"
}
@bjdmeest
Copy link
Collaborator

bjdmeest commented Jun 2, 2022

Thanks for your issue! This is a consequence of using the RDF4J writers, see eclipse-rdf4j/rdf4j#3643. There's not much we can do at this moment (I also cannot find a way, e.g., via JSONLD compacting, to fix this).

@bjdmeest bjdmeest added the upstream Issue is related to another component then the RMLMapper label Jun 2, 2022
@adlerfaulkner
Copy link
Author

Got it. Thanks for the info! Handled it with a hack on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Issue is related to another component then the RMLMapper
Projects
None yet
Development

No branches or pull requests

2 participants