Re: [ogpx] type-system : binary elements in JSON serializations

"Hurliman, John" <john.hurliman@intel.com> Mon, 29 March 2010 18:05 UTC

Return-Path: <john.hurliman@intel.com>
X-Original-To: ogpx@core3.amsl.com
Delivered-To: ogpx@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id AD9043A6A4A for <ogpx@core3.amsl.com>; Mon, 29 Mar 2010 11:05:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.869
X-Spam-Level:
X-Spam-Status: No, score=-2.869 tagged_above=-999 required=5 tests=[BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ji0fDwNIdcu7 for <ogpx@core3.amsl.com>; Mon, 29 Mar 2010 11:05:30 -0700 (PDT)
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by core3.amsl.com (Postfix) with ESMTP id EF70D3A6B2A for <ogpx@ietf.org>; Mon, 29 Mar 2010 11:05:25 -0700 (PDT)
Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 29 Mar 2010 11:01:05 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="4.51,329,1267430400"; d="scan'208";a="553159035"
Received: from rrsmsx604.amr.corp.intel.com ([10.31.0.170]) by fmsmga002.fm.intel.com with ESMTP; 29 Mar 2010 11:04:29 -0700
Received: from rrsmsx506.amr.corp.intel.com ([10.31.0.39]) by rrsmsx604.amr.corp.intel.com ([10.31.0.170]) with mapi; Mon, 29 Mar 2010 12:05:52 -0600
From: "Hurliman, John" <john.hurliman@intel.com>
To: Meadhbh Hamrick <ohmeadhbh@gmail.com>, ogpx <ogpx@ietf.org>
Date: Mon, 29 Mar 2010 12:05:48 -0600
Thread-Topic: [ogpx] type-system : binary elements in JSON serializations
Thread-Index: AcrOnONq2BfoViVCSrOszuvlmfYCMwAzUizA
Message-ID: <62BFE5680C037E4DA0B0A08946C0933DCB5FB69D@rrsmsx506.amr.corp.intel.com>
References: <b325928b1003281033p28c92367x2be877cc348268da@mail.gmail.com>
In-Reply-To: <b325928b1003281033p28c92367x2be877cc348268da@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [ogpx] type-system : binary elements in JSON serializations
X-BeenThere: ogpx@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group <ogpx.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ogpx>, <mailto:ogpx-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ogpx>
List-Post: <mailto:ogpx@ietf.org>
List-Help: <mailto:ogpx-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ogpx>, <mailto:ogpx-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Mar 2010 18:05:31 -0000

I think supporting conversion to and from string and binary at the LLSD level is a good idea, and I don't see any downsides to this approach.

John

> -----Original Message-----
> From: ogpx-bounces@ietf.org [mailto:ogpx-bounces@ietf.org] On Behalf Of
> Meadhbh Hamrick
> Sent: Sunday, March 28, 2010 10:34 AM
> To: ogpx
> Subject: [ogpx] type-system : binary elements in JSON serializations
> 
> i'm not sure if this was the recommendation made at the f2f meeting
> last tuesday, so let me try to define it.
> 
> the issue is that JSON does not provide a mechanism to differentiate
> between a string that contains textual data and a string that contains
> the base64 encoding of binary data. the current technique for avoiding
> this ambiguity was to encode binary data as an array of unsigned 8 bit
> numbers. many people do not like this technique.
> 
> the suggestion at the f2f was, if i remember it correctly, to simply
> BASE64 encode the binary data and carry the encoding in a string.
> 
> this got me thinking...  section 2.1.9 does not include a generic
> conversion from a string to a binary. maybe we should put this
> conversion in the LLSD section instead of the JSON encoding section.
> if someone is expecting an element to be a binary, it is likely to
> attempt to access it as a binary anyway. by moving this conversion
> into the LLSD section, it allows us to punt on tryign to id binaries
> in the encoding and allows users of other serialization schemes to be
> lazy about the conversion.
> 
> so i'm suggesting we make a change like this to section 2.1.9:
> 
> "2.1.9. Binary
> 
>    Data of type Binary contains a sequence of zero or more octets.  The
>    default Binary is a sequence of zero octets.
> 
>    Conversions:
> 
>    String  The contents of the string are interpreted as a BASE64
> encoding
>       and converted following the rules in RFC XXXX with <insert
> alphabet here>
>       and <insert statement about ignoring line breaks here>."
> 
> comments?
> 
> also, if we have a conversion from string to binary, must we have a
> conversion the other way? it would be simple to define, just curious
> if peeps think we MUST do it.
> 
> -cheers
> -meadhbh
> --
> meadhbh hamrick * it's pronounced "maeve"
> @OhMeadhbh * http://meadhbh.org/ * OhMeadhbh@gmail.com
> _______________________________________________
> ogpx mailing list (VWRAP working group)
> ogpx@ietf.org
> https://www.ietf.org/mailman/listinfo/ogpx