JSON Scehma validaton with error handling