First phase of json parser