google / google/gson

Validate JSon again Json Schema file

Open
#783 5 comments 14 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
24.2k
Forks
4.5k
Avg merge
6d 4h
Merged PRs (30d)
12

Description

It is quite important that you can quickly validate that a given Json string complies with a required JSON schema. You would not want to built your own custom for-each loop and check that each attribute is there or not.

If you for example build an API or similar these days you can use Rest specifications like RAML. Doing so has a lot of advantages, for example code generation, easy to understand for 3rd parties or self-explaining with built in examples. However it all relies on being able to quickly validate a Json string against a schema definition.

Unfortunately there is no good Java Json Schema validator. Neither in Gson nor in any 3rd party library. It would be really useful if this is part of the Gson framework.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.