[erlang-questions] binary typed schema-less protocol

Chris King colanderman@REDACTED
Tue Jul 30 19:44:37 CEST 2013


On Tue, Jul 30, 2013 at 1:18 PM, Vincent de Phily
<vincent.dephily@REDACTED> wrote:
> On Tuesday 30 July 2013 10:31:04 Chris King wrote:
>> Color me confused, but doesn't only PER require a schema?  BER/DER/CER
>> are all self-describing.
>
> Only up to a point. When decoding, you'll know that you're dealing with, say,
> an integer, but you won't know which field of the enclosing sequence it
> corresponds to, if the fields are optional (that's just one example of
> confusion, but there are more). So you can decode a squeleton of your data,
> but it'll lack meaning.

This particular problem I thought was addressed by SET types with
explicitly tagged members?

The shortcoming I *do* see is that the member tags must be integers;
the advantage JSON has is that the tags may be strings.  Even then,
string tags only aid humans, not machines.

This is a limitation to be sure, but I wouldn't say this makes the
difference between a schema-ful and schema-less encoding.


(P.S. Sorry if you get two copies Vincent; I'm on an unfamiliar mail
client today and keep hitting "Reply" instead of "Reply All".)



More information about the erlang-questions mailing list