cast port number as string for json encoding