79819959

Date: 2025-11-14 11:20:40
Score: 2.5
Natty:
Report link

Thanks to @dbc. The problem was not in the .NET itself, but with a database (in my case MySQL 8.4), which did reorder the JSON props. MySQL can and do normalize/reorder the JSON object so the order cannot be relied on, so the only option in this case is adding AllowOutOfOrderMetadataProperties = true in the JsonSerializerOptions.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • User mentioned (1): @dbc
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Sannnekk