now we walk the json file twice, once to capture counts to allocate exactly what's needed and the second to capture the event data.