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
It would be awesome if there was an easy way to configure how byte[] is serialized. As far as I know by default byte[] is serialized as a Base64-encoded string, however, we would prefer if the byte[] is serialized as JSON array instead. We know we can use a custom JsonConverter, but it seems odd that this (at least in our mind) very peculiar behavior cannot be configured in an easier way.
There are several reasons for this wish:
We like the symmetry with other array types
If we omit the type name when having a property with a declared type of IReadOnlyList<byte> and an actual type of byte[] it would still work, while it does not work when the byte[] is serialized as string, since the deserializer cannot infer that the string actually represents bytes.
Is there already an easy way to configure the byte[] serialization behavior we don't know of?
The text was updated successfully, but these errors were encountered:
It would be awesome if there was an easy way to configure how
byte[]
is serialized. As far as I know by default byte[] is serialized as a Base64-encoded string, however, we would prefer if thebyte[]
is serialized as JSON array instead. We know we can use a custom JsonConverter, but it seems odd that this (at least in our mind) very peculiar behavior cannot be configured in an easier way.There are several reasons for this wish:
IReadOnlyList<byte>
and an actual type ofbyte[]
it would still work, while it does not work when thebyte[]
is serialized as string, since the deserializer cannot infer that the string actually represents bytes.Is there already an easy way to configure the
byte[]
serialization behavior we don't know of?The text was updated successfully, but these errors were encountered: