specifying the json structures and validations