parse header, get len of json metadata