Serialize JID to allow json serializing