Newtonsoft JSON serialization for byte[] property [duplicate]
问题 This question already has answers here : How to serialize byte[] as simple JSON Array and not as base64 in JSON.net? (3 answers) Closed 3 years ago . public class MyClass { public byte[] Bytes{get;set;} } MyClass obj = new MyClass(); obj.Bytes = new byte[]{1,22,44,55}; string s_result = Newtonsoft.Json.JsonConvert.SerializeObject(obj); // my s_result looks like {"Bytes":"KQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="} I want result like "Bytes":"1,22,44,55" I did work around for this by