Git Product home page Git Product logo

Comments (2)

ledsoft avatar ledsoft commented on May 25, 2024 1

On a second thought, a more generic solution which would most likely resolve the problem would be support for custom (de)serializers for fields/classes much like Jackson's @JsonDeserialize and JsonSerialize. That way, you would be able to easily override the default (de)serialization behavior.

I'll create an issue for it, but it may take a while to implement...

from jb4jsonld.

ledsoft avatar ledsoft commented on May 25, 2024

That's a good question. I'm not very familiar with activity streams, but given the said properties, I think it depends whether type information is available in the JSON-LD input. If it is (like Example 110 and 111 for the URL property definition), JB4JSON-LD should be able to determine correct actual Java type even if the target field type is Object.
If type information is not available in the input, it is basically impossible to determine the actual target type and the library will attempt to use plain Object.
Another problem could be determining whether to use OWLDataProperty or OWLObjectProperty if the value is either plain string (xsd:anyURI) or a Link object, but in that case, it should help to use OWLAnnotationProperty, which accepts both literal values and objects. However, that may not be suitable if OWL reasoning on storage level comes into play. But that would depend on your specific case.

from jb4jsonld.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.