jAvA
jAvA

Reputation: 583

json schema to pojo generator

what is the best json to pojo generator which have oneof/allof/anyof features . We are currently using a custom one which doesn't support the latest additions in the json. I have tried some of them that shows in the google search but didn't work.

Upvotes: 3

Views: 3186

Answers (1)

Priya Jain
Priya Jain

Reputation: 830

I use https://github.com/java-json-tools/json-schema-validator for schema validation and jackson for pojo-generator. However, I did not find any support for allOf/AnyOf/oneOf explicitly in jackson. But jackson has a rich set of annotation and it can be built using those. you can refer a discussion https://github.com/joelittlejohn/jsonschema2pojo/issues/392 to see if something helpful is there for you.

Upvotes: 1

Related Questions