6.4.2. Customize the Externalizer ID (Programmatically)
Use the following configuration to programmatically assign a specific ID to the externalizer:
GlobalConfiguration globalConfiguration = new GlobalConfigurationBuilder()
.serialization()
.addAdvancedExternalizer($ID, new Person.PersonExternalizer())
.build();
GlobalConfiguration globalConfiguration = new GlobalConfigurationBuilder()
.serialization()
.addAdvancedExternalizer($ID, new Person.PersonExternalizer())
.build();
Replace the $ID with the desired ID.