perwendel / spark

A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin
Apache License 2.0
9.64k stars 1.56k forks source link

[Question] validating post object #1038

Closed vlio20 closed 5 years ago

vlio20 commented 5 years ago

Hi, Is there any easy way to validate object - for example, post request body should have valid email format in the provided json.

tipsy commented 5 years ago

Nothing built in.

vlio20 commented 5 years ago

@tipsy , any suggested design pattern? I am familiar with how it's done in spring (@RequestBody)

tipsy commented 5 years ago

Not really, it's up to you. I usually use Jackson.