简体   繁体   中英

Generate POJO from JSON-LD or RDF to be used with Jackson or GSON

How can I generate a POJO from a JSON-LD specification (or RDF), so that I can serialize and deserialize my POJO that conforms to this specification?

So, my question is how I can generate a POJO from let's say a big specification, so I don´t have to handwrite an error prone POJO myself to be used with Jackson.

As an example, how can I generate (not handwrite) a POJO that can be used with eg Jackson (or GSON) out of this:

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "url": "http://www.example.com",
  "name": "Unlimited Ball Bearings Corp.",
  "contactPoint": {
    "@type": "ContactPoint",
    "telephone": "+1-401-555-1212",
    "contactType": "Customer service"
  }
}

Is that possible?

Pinto was built precisely to be the Jackson for the RDF space. Note it's not integration with Jackson (or GSON for that matter), just something that is inspired by those frameworks.

Full disclaimer, I'm the author of Pinto.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM