serialize JID to allow json serializing