Added validate JSON method