You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.Text.Json serialization behavior difference of primitive arrays.
The exact same object but passed with a different static type will end up being serialized differently. I could understand this happening for polymorphic cases, but this case is just arrays of primitive types. Note that this is specific to a byte array as it serializes to Base64 if recognized as such, all other primitive arrays serialize as arrays of their elements.
I don't think we can change/fix this, but I think it would be interesting to learn why and if this is intentional or not (and if we have tests for this difference).