In a future evolution we will need to rename YangInstanceIdentifier and its components, which means we would be breaking Serializable compatibility without a migration path.
Make sure all these components use a externalizable proxy, which can act as a compatibility bridge between the current world and future.