We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently there is no way to automatically let the JSONConverter validate deserialized objects.
JSONConverter
You'd have to validate the objects manually after creation which is error-prone.
The JSONConverter should automatically handle validation (similar to how Spring Bean Validation would work)
Idea:
Create a interface like JSONConvertable which defines a method called validate()
JSONConvertable
validate()
Inside the JSONConverter refactor the fromJson method so that It looks like this
fromJson
`public T fromJSON(Class clazz, String json) ...
and call the validate() method automatically
The text was updated successfully, but these errors were encountered:
PR: #3890
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Situation
Currently there is no way to automatically let the
JSONConverter
validate deserialized objects.You'd have to validate the objects manually after creation which is error-prone.
Wanted
The
JSONConverter
should automatically handle validation (similar to how Spring Bean Validation would work)Solution
Idea:
Create a interface like
JSONConvertable
which defines a method calledvalidate()
Inside the
JSONConverter
refactor thefromJson
method so that It looks like this`public T fromJSON(Class clazz, String json) ...
and call the
validate()
method automaticallyThe text was updated successfully, but these errors were encountered: