The MIDI Forum

  1. Brad
  2. MIDI Specifications
  3. Friday, 28 February 2020
  4.  Subscribe via email
Why would JSON chosen for parameter exchange?

It seems that a standard such as CBOR (RFC 7049) would have been a better choice for several reasons:

  • It's binary, so rather than having to base64-encode binary data for things like PCM samples to send to samplers, we could just send the data
  • It's has very broad support, with implementations on most any language, just like JSON
  • It's streamable
  • It supports all the types JSON supports, and then some
  • The type system is extensible, so types relevant to MIDI could be easily added
  • It requires less CPU and memory to deal with, as parsing is simple.
There are no comments made yet.
Accepted Answer Pending Moderation
Thanks for the question.
JSON was chosen for a number of reasons

  • it's mainly 7 bit. There is a requirement to transfer the data over midi 1.0 SysEx messages which only allow 7bit. JSON has mechanism for handling utf16 values in 7 bit.
  • it's human readable. It was important to have a format that could be read easily in a text format
  • the eco system. JSON is very well known and it is recognisable to developers

If I understand CBOR correctly, CBOR has the same issue as msgpack in that it is an 8bit format. Future designs could perhaps make use of these technologies, if so decided ?

I hope that helps?
There are no comments made yet.
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!