added json load and validation