El Monday 08 February 2016, Bram Moolenaar escribió: > Alejandro Exojo wrote: > > 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.
Then you confuse me more. Isn't Protocol Buffers binary? Also, given that the goal is RPC, and not just a format, note that both the old and the new guys of Protocol Buffers are considering newer approaches: https://capnproto.org/news/2014-06-17-capnproto-flatbuffers-sbe.html > > > 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. One RFC obsoltes the other. The more up to date RFC is more recent than the ECMA paper, but I don't see any significant difference, specially an incompatible one. It just says: RFC 4627 was written by Douglas Crockford. This document was constructed by making a relatively small number of changes to that document; thus, the vast majority of the text here is his. I see some clarification with respect to encoding, actually. > I already pointed out some flaws. Another one is that it should only > support utf-8 and nothing else to simplify encoders/decoders. The RFC doesn't say so. But yes, if you put an invalid text inside a text type, you are going to get awkward results. A string type in some languages or libraries just doesn't support broken Unicode. If the definition of a text type is what is specified by Unicode (why would you choose a different specification of something as complex as that?), you need to be strict, and use a byte array if you need something more liberal. -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net
