add throw method to json schema.