Re: [apps-discuss] Concise Binary Object Representation (CBOR)

Nico Williams <> Thu, 23 May 2013 16:14 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 15FF221F9588 for <>; Thu, 23 May 2013 09:14:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.797
X-Spam-Status: No, score=-1.797 tagged_above=-999 required=5 tests=[AWL=0.180, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 4qTcxRegLqsp for <>; Thu, 23 May 2013 09:13:49 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id D6D3E21F9742 for <>; Thu, 23 May 2013 09:13:49 -0700 (PDT)
Received: from (localhost []) by (Postfix) with ESMTP id 4B8F23B8069 for <>; Thu, 23 May 2013 09:13:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type;; bh=O9xSwCSEJkzoCZ2/iu6h eXzeR3s=; b=mcd379FJTydb/BdEt+QeYVsvv7BtiVoTPxFUaBYmrE2+hc3kPsss zN0vc37Pu7iDa1cIRATVFh5bctcHV3nMyp2EHYmTnJkNOXRDz8buJrccnmntYBgt NQhXkxUwkVo1BvQU2e0CWkTeJsKYaVjembFyCnSIBrgRGowdw++9tko=
Received: from ( []) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id E7D473B8062 for <>; Thu, 23 May 2013 09:13:48 -0700 (PDT)
Received: by with SMTP id hn14so5122924wib.0 for <>; Thu, 23 May 2013 09:13:47 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XmTQ5UdM2FgcDs7ImDmlCBEDH6UGcfBOTB12oMRPOok=; b=PkU9Zx/yC3YKSfZLwGaWXMrvUPl4Q5srhuhnQoETQnpvy7FCvVm418cFiwqJ0mdPQU pzpaGQs14v4029x2wO1Ra24e8837/jy4b9jrgckySskWeE6Fj7NxP/Z/KihFhw97jfDi BecuGKsb12GZUm/WoDVsBYtYaj1379B2jTZMuE42l0b1mxIi4ILKLfq0Dguj+bDZ3eOU cYPyK450g7SvEYWbFyKpntE9paliGgP7XudQV1Kpw9TX1kNB48kO1ze/PdNpOplQ7mJR +89zUB1Rpv7FuyuNWQrVjBYSVj7FOHUf3WFULttOwaVGqNcD50L9Qe24HH0vUDj91YAJ c00A==
MIME-Version: 1.0
X-Received: by with SMTP id gf9mr25845288wic.32.1369325626674; Thu, 23 May 2013 09:13:46 -0700 (PDT)
Received: by with HTTP; Thu, 23 May 2013 09:13:46 -0700 (PDT)
In-Reply-To: <>
References: <>
Date: Thu, 23 May 2013 11:13:46 -0500
Message-ID: <>
From: Nico Williams <>
To: Paul Hoffman <>
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [apps-discuss] Concise Binary Object Representation (CBOR)
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 23 May 2013 16:14:00 -0000

Also, I believe this is the fifth binary encoding of JSON proposed
thus far.  Can we list the ones that have been proposed thus far?

Here's a [no-doubt partial] list:

 - MsgPack
 - Smile

That's just the ones I recall seeing before or which I found in 30
seconds of searching.

Some of these are used in actual protocols right now.

An analysis of these might be nice.

(While you're at that, and considering variable length encodings of
things... SQLite4 has some really neat variable length encodings of
all its data types, specifically designed to make sorting via memcmp()
possible.  I'm not sure what relevance that might have here, but it
should be of interest to anyone designing variable length encodings of

I do agree that we need a schema-less encoding (which means we can't
get as good as PER and friends).  We probably don't need a
schema-capable encoding for JSON (though that might be nice).  We do
need schema-aware encodings for some protocols, but we have plenty
already, and none are nor need to be JSONish.

(I've wanted to define a JSON Encoding Rules for ASN.1, primarily to
make debugging apps that use ASN.1-based protocols easier (dump PDUs
as ASN.1).)