users@jersey.java.net

Re: [Jersey] JSON Validation

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 31 Mar 2010 09:53:55 +0200

On Mar 25, 2010, at 6:45 PM, Tatu Saloranta wrote:

> On Thu, Mar 25, 2010 at 9:19 AM, Chris Carrier <ctcarrier_at_gmail.com>
> wrote:
>> Some integration would be cool but most of my problem was not being
>> aware of JSR-303 and the Hibernate Validator implementation. Once I
>> annotated my POJO's it was trivial to inject a validator instance
>> with
>> Spring and trigger a validation. It's a small amount of boilerplate
>> but so much simpler than the way I was doing it before. So yeah it
>> would be even cooler if validation just happened magically if the
>> POJO
>> was annotated with javax.validation tags but it doesn't seem like it
>> should be top of the TODO list or anything.
>
> Cool. That was what I was thinking too -- simple enough for me, so I
> did not spent lots of time trying to find ways to save couple of lines
> of code. I suspect there are ways to do that, but it wasn't bad enough
> itch so to speak.
> Perhaps having sample code would be easiest way to further simplify it
> for others.
>

Yes. Chris, if you have any sample code handy or want to contribute a
sample that would be most helpful.

Paul.

> Glad to hear the idea was helpful,
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>