Capture network packets and write them to JSON for easy parsing.