简体   繁体   English

json模式到pojo生成器

[英]json schema to pojo generator

what is the best json to pojo generator which have oneof/allof/anyof features . 什么是最好的json to pojo发生器,它具有oneof / allof / anyof功能。 We are currently using a custom one which doesn't support the latest additions in the json. 我们目前使用的是自定义的,不支持json中的最新添加。 I have tried some of them that shows in the google search but didn't work. 我尝试了一些在谷歌搜索中显示但没有奏效的。

I use https://github.com/java-json-tools/json-schema-validator for schema validation and jackson for pojo-generator. 我使用https://github.com/java-json-tools/json-schema-validator进行模式验证,使用jackson进行pojo-generator。 However, I did not find any support for allOf/AnyOf/oneOf explicitly in jackson. 但是,我没有在jackson中发现任何对allOf / AnyOf / oneOf的支持。 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. 你可以参考讨论https://github.com/joelittlejohn/jsonschema2pojo/issues/392 ,看看是否有适合你的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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