  Pulsars are thought to be highly magnetized rotating neutron stars
accelerating charged particles along magnetic field lines in their
magnetosphere and visible as pulsed emission from the radio wavelength up to
high energy X-rays and gamma-rays. Being highly compact objects with
compactness close to $\Xi = R_s/R\approx0.5$, where $\Rs=2\,G\,M/c^2$ is the
Schwarzschild radius and $\{M,R\}$ the mass and radius of the neutron star,
general-relativistic effects become important close to their surface. This is
especially true for the polar caps where radio emission is supposed to emanate
from, leading to well defined signatures such as linear and circular
polarization. In this paper, we derive a general formalism to extend to general
relativity the Deutsch field solution valid in vacuum space. Thanks to a vector
spherical harmonic expansion of the electromagnetic field, we are able to
express the solution to any order in the spin parameter $\Omega$ of the compact
object. We hope this analysis to serve as a benchmark to test numerical codes
used to compute black hole and neutron star magnetospheres.
