How to serialize byte[] as simple JSON Array and not as base64 in JSON.net?

后端 未结 3 667
轮回少年
轮回少年 2020-11-30 05:35

I use JSON.net to serialize some objects between C# and JavaScript. The JSON data is transfered via WebSocket between the .NET and browser application.

In the data

3条回答
  •  -上瘾入骨i
    2020-11-30 06:23

    Ref my answer, JSON.net can customze serialization in setting for all instead of attribute in property.

    You can easily change it from base64 to number array, just write a square bracketed csv raw value.

提交回复
热议问题