Hi Kasper, thanks for your answer. I understand I could use those tools to validate a JSON object against an expected schema expressed as a JSON schema, or as a mapping to a java POJO. You can use metamodel to specify JSON transformation as SQL queries, the idea I had was using metamodel to specify JSON validations as SQL table schemas. But using JSON schema looks like the simplest solution here.
Thanks again for your help. Greetings, Juan On Sat, Jun 4, 2016 at 9:10 AM, Kasper Sørensen < [email protected]> wrote: > I'm not sure MetaModel is the right tool for the job in your case, > Juan. I might be wrong and not seeing the light here. > In cases where I've needed to do JSON validation, I've used (and can > thus far recommend using) Jackson and Hibernate Validator. > > 2016-06-02 12:37 GMT-07:00 Juan Rodríguez Hortalá > <[email protected]>: > > Hi, > > > > I have to check that some JSON objects have a certain shape. I was > > considering specifying the schema as a Table object, and then using > > JsonDataContext for implementing this check. The idea is defining a > method > > that given a Table and a String for a JSON object, returns a boolean > saying > > whether the JSON is complaint with the schema or not. Can that be easily > > implemented with metamodel? > > > > Thanks in advance. > > > > Greetings, > > > > Juan >
