Alejandro Exojo wrote:

> 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 know Crockford.  He has some good ideas and some bad ideas.  He isn't
really a JavaScript promotor, but he does make money from the book, so
you can't expect him to be too negative :-).

> > 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

I don't like binary formats.

> > 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.

https://tools.ietf.org/html/rfc4627
https://tools.ietf.org/html/rfc7159.html
http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf

There was also rfc7158 but it was discarded.

I already pointed out some flaws.  Another one is that it should only
support utf-8 and nothing else to simplify encoders/decoders.

-- 
hundred-and-one symptoms of being an internet addict:
183. You move your coffeemaker next to your computer.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui