Conversation
bergmania
approved these changes
Jul 4, 2024
Member
|
Thanks for the PR.. Sadly this is super required by the block editors currently. |
Member
|
Cherry picked to 14.1 |
1 task
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
If there's an existing issue for this PR then this fixes #16587.
Description
Although I initially thought the CMS data type configuration migration (executed when upgrading v13 to v14) caused Deploy to write updated UDA files, it is actually due to the
JsonObjectConverter(that's used by theIConfigurationEditorJsonSerializerfor reading and writing data type configuration) not correctly parsingDataTimeOffsetvalues.This custom JsonConverter takes care of deserializing JSON values into
objectinstances to their simple/primitive types (boolean, integer, date or string), instead of a boxedJsonElement(see https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-9-0#deserialization-of-object-properties). I assume this has been copied from the example in the Microsoft documentation, which clearly isn't really suitable to be used in production 🫤 Removing this converter would be a massive breaking change, as values will be parsed differently when deserializing, but I would suggest looking into thing for a future major release, as this also contains multiple performance issues (loading everything into lists, casting, creating generic types and new instances via reflection, etc.)...