3 ms·
I would personally use Base64 or Hex encoded binary data too if I controlled both sides of the communication. However, the original commenter was worried about
by dsp1234 10y ago
I would personally use Base64 or Hex encoded binary data too if I controlled both sides of the communication.
However, the original commenter was worried about stuff "that's outside the JSON standard,". Storing byte-sized numbers in an array is well within the JSON standard, and any system that could consume json would be able to consume it without issue, and without additional dependencies.
- anorwell 10y agoIt seems to me that an array of ints depends on agreed convention (beyond the JSON standard) just as much as a base64 string does. In general, interpreting the meaning of a JSON primitive (int, string, boolean) is something that is being agreed upon by the users of the format.