El Saturday 06 February 2016, Bram Moolenaar escribió: > I don't want to spend much time discussing this. v:null and v:none are > needed just like JavaScript has null and undefined.
Having too many falsey types/values (null, undefined, NaN...) is considered one of the flaws of JavaScript. Crockford, who is a JavaScript promoter, and created JSON, did not include anything besides null. > I was thinking of taking this a step further to a more efficient > encoding that is similar to Javascript. Unfortunately I haven't been > able to find a specification. I thought it was used in combination with > protocol buffers. Besides empty entries in an array, it also removes > the quotes around object item names. It's more efficient and doesn't > drop any functionality. We could add protocol buffer support, but let's > leave that for some other time. You can consider CBOR as well, if you want something well standarized: http://tools.ietf.org/html/rfc7049 There are some similarities with msgpack, but IIRC it has some additions. Here is a library, in case you want to consider adding it or playing with it: https://github.com/01org/tinycbor > Also keep in mind that when you want to stick to the JSON standard > (well, one of them), Is there more than one JSON standard? The standard might have flaws, and even more so the implementations, but there is supposed to be only one. -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net
