title: How do I serialize UniqueIdentifier to string and back
body: <p>I need to pass a <code>UniqueIdentifier</code> as a string between two services. Unfortunately <code>UniqueIdentifier#toString</code> and <code>UniqueIdentifier.fromString</code> do not work well if an <code>externalId</code> is set.</p>
  
  <p>What is the canonical way of serializing and deserializing a <code>UniqueIdentifier</code>?</p>