Some data stores, eg MySQL, will change the order of properties when storing json in a json column: https://dev.mysql.com/doc/refman/8.0/en/json.html
That breaks with the expected placement of the discriminator property, that STJM expects to be the first.
Let's check the setting https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializeroptions.allowoutofordermetadataproperties?view=net-10.0 and if that is true then scan for the discriminator property.
There is a performance impact of enabling this feature when it is not needed, so let's have it turned off by default.
Let's also research other data storage providers to see which behave like MySQL, then we can list that in the docs.
Some data stores, eg MySQL, will change the order of properties when storing json in a json column: https://dev.mysql.com/doc/refman/8.0/en/json.html
That breaks with the expected placement of the discriminator property, that STJM expects to be the first.
Let's check the setting https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializeroptions.allowoutofordermetadataproperties?view=net-10.0 and if that is true then scan for the discriminator property.
There is a performance impact of enabling this feature when it is not needed, so let's have it turned off by default.
Let's also research other data storage providers to see which behave like MySQL, then we can list that in the docs.