title: How to marshal a byte/uint8 array as json array in Go?
body: <p>I've got a struct with a <code>[]uint8</code> member and I'm writing it with <code>json.Marshal</code>. Trouble is, it's interpreting the <code>uint8</code>s as <code>char</code>s and it outputs a string rather than an array of numbers. </p>
  
  <p>I can get this to work if it's a <code>[]int</code>, but I don't want to have to allocate and copy over the items if I can avoid it. Can I?</p>