added json validation to model