First part of the json parser and validator