Seeking advice from anyone who has faced similar issues with the Digizuite For Optimizely (DFO) v4 connector and polymorphic JSON handling.
Context After upgrading to Digizuite connector 4.2.2 (DFO v4), we started seeing JSON deserialization failures impacting search and indexing. We rolled back to 4.1.0 to stabilize production.
Main error System.NotSupportedException: The JSON payload for polymorphic interface 'Digizuite.Metadata.ResponseModels.MetadataResponse' must specify a type discriminator.Path: $.AssetResponse.AdditionalMetadata.fa78bae2-4fce-4ca1-a252-3411c227df78 Source: System.Text.Json (via Digizuite.Optimizely.Database.Repositories.DefaultDigizuiteContentRepository)
Where it occurs - Search & Navigation Content Indexing Job - fails to complete - Search results page - crashes when clicking results at /en/search - Page rendering - crashes when loading Digizuite assets via metadata helpers
Observations
System.Text.Json requires a type discriminator (e.g., $type) for polymorphic deserialization of abstract types like MetadataResponse
This breaking change is NOT documented in the official DFO 4.2.0 breaking changes documentation
Existing assets in database lack the $type field, causing crashes
Digizuite 4.2.2 appears to expect discriminators that aren't present in legacy metadata
Testing results ✅ Version 4.1.0: Stable - all functionality works (search, indexing, asset loading) ❌ Version 4.2.2: Broken - crashes on indexing and search operations
Questions for the community
1. Has anyone successfully run Digizuite 4.2.2+ without encountering this polymorphic serialization issue?
2. Is there a metadata migration required when upgrading to 4.2.2? (Not mentioned in docs)
3 .Any configuration to make 4.2.2 backward-compatible with assets lacking type discriminators?
4. Should we contact Digizuite support, or is there a known community solution?
Environment
Optimizely CMS: 12.33.1 Digizuite/DFO connector: Upgraded from 4.1.0 → 4.2.2 (rolled back to 4.1.0) .NET: 9.0 Serialization: System.Text.Json (default in .NET 9) EF Core: 6.0.16
Reference DFO 4.2.0 – Breaking changes (this specific issue is NOT listed): https://keyshot.atlassian.net/wiki/spaces/DD/pages/4411033088/DFO+4.2.0+-+Breaking+changes
Any insights, migration scripts, configuration examples, or version recommendations would be greatly appreciated. We're currently stable on 4.1.0 but want to understand what's needed to safely upgrade in the future.
Seeking advice from anyone who has faced similar issues with the Digizuite For Optimizely (DFO) v4 connector and polymorphic JSON handling.
Context
After upgrading to Digizuite connector 4.2.2 (DFO v4), we started seeing JSON deserialization failures impacting search and indexing. We rolled back to 4.1.0 to stabilize production.
Main error

System.NotSupportedException: The JSON payload for polymorphic interface 'Digizuite.Metadata.ResponseModels.MetadataResponse' must specify a type discriminator.Path: $.AssetResponse.AdditionalMetadata.fa78bae2-4fce-4ca1-a252-3411c227df78
Source: System.Text.Json (via Digizuite.Optimizely.Database.Repositories.DefaultDigizuiteContentRepository)
Where it occurs
- Search & Navigation Content Indexing Job - fails to complete
- Search results page - crashes when clicking results at /en/search
- Page rendering - crashes when loading Digizuite assets via metadata helpers
Observations
✅ Version 4.1.0: Stable - all functionality works (search, indexing, asset loading)
❌ Version 4.2.2: Broken - crashes on indexing and search operations
Questions for the community
1. Has anyone successfully run Digizuite 4.2.2+ without encountering this polymorphic serialization issue?
2. Is there a metadata migration required when upgrading to 4.2.2? (Not mentioned in docs)
3 .Any configuration to make 4.2.2 backward-compatible with assets lacking type discriminators?
4. Should we contact Digizuite support, or is there a known community solution?
Environment
Optimizely CMS: 12.33.1
Digizuite/DFO connector: Upgraded from 4.1.0 → 4.2.2 (rolled back to 4.1.0)
.NET: 9.0
Serialization: System.Text.Json (default in .NET 9)
EF Core: 6.0.16
Reference
DFO 4.2.0 – Breaking changes (this specific issue is NOT listed):
https://keyshot.atlassian.net/wiki/spaces/DD/pages/4411033088/DFO+4.2.0+-+Breaking+changes
Any insights, migration scripts, configuration examples, or version recommendations would be greatly appreciated. We're currently stable on 4.1.0 but want to understand what's needed to safely upgrade in the future.