Refactor manual JSON schema validation

This introduces a reusable validator and moves JSON schema validation to the model.
Refactor section JSON schema validation