serialize network transmissions as JSON