JSON模式验证工具 [英] Tool for JSON schema validation

查看:130
本文介绍了JSON模式验证工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要验证项目中传入的POST json.这是我正在开发的RESTFul json服务的一部分.这些json需要进行验证

I have need to validate incoming POST jsons in my project. This is a part of a RESTFul json service i am developing. These jsons need to be validated for

  1. 强制性属性
  2. 无效的属性
  3. 数据类型

只需阅读有关 json-schema-validator ,它看起来就不错.

Just read about json-schema-validator and it looks good.

有人在Maven/Spring项目中使用它吗?我可以使用任何更好的(ito-API,稳定性)工具吗?

Has anyone used this in maven/spring projects? Is there any better (ito - API, stability) tool that i can use?

更新-我也在查看 json工具

Update - i am also looking at json tools

推荐答案

免责声明: https:的作者: //github.com/fge/json-schema-validator 此处...

Disclaimer: author of https://github.com/fge/json-schema-validator here...

该库不依赖于任何与Web相关的内容,因此您可以在准Java应用程序中使用它,这是仅用于servlet的Java应用程序(我什至

This library has no dependency on anything web-related, so you can use it in a bare-bones Java application, a servlet-only Java application (I have even made one) or with Spring. It won't be a problem.

希望这会有所帮助!

这篇关于JSON模式验证工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆