Identifier serialization and comparison