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

Serialize annotation property values which are references as objects #13

Closed
ledsoft opened this issue Feb 28, 2020 · 2 comments
Closed
Labels

Comments

@ledsoft
Copy link
Contributor

ledsoft commented Feb 28, 2020

As a user, I want JB4JSON-LD to serialize annotation property values as objects in case they represent individual references.

That is, if the annotation property value is a URI/URL, it should be serialized as an object with a single attribute - @id.

@ledsoft
Copy link
Contributor Author

ledsoft commented Feb 28, 2020

Example:

class A {

@OWLAnnotationProperty(iri = "http://example.org/annotation")
private Object annotation;
}

A a = new A();
a.annotation = URI.create("http://example.org");

Should be serialized as (ID omitted):

{
    "http://example.org/annotation": {
        "@id": "http://example.org"
    }
}

ledsoft added a commit that referenced this issue Mar 2, 2020
…notation property attributes of type Object.
@ledsoft
Copy link
Contributor Author

ledsoft commented Mar 2, 2020

Implemented in 0.5.0.

@ledsoft ledsoft closed this as completed Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant