If you want to create instances of this, is the String constructor really the right approach? Wouldn't you prefer an API like ProjectReference(String repository, String branch, String projectDir)?

Or if you really want to use the serialized String approach, maybe there should be a method here that returns such a String from an existing ProjectReference (doing the inverse of the constructor).