Clarifying flow logic for json parsing