且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否有用于XML绑定的JavaScript API - 类似于JAXB for Java?

更新时间:2023-01-25 17:16:44

JSON对JAXB的支持如何?重用当前带有JAXB注释的模型类,但从REST端点输出JSON。

How about JSON support for JAXB? Reuse your current JAXB annotated model classes but output JSON from your REST endpoints.

当前版本的泽西岛支持这一点(通过 jersey = json 模块) JSONJAXBContext

Current versions of Jersey support this (via the jersey-json module) with JSONJAXBContext.

您也可以尝试 Jackson JAXB JAX-RS 支持。

You could also try Jackson's JAXB and JAX-RS support.