[ogpx] (Not) serializing LLSD default values

"Hurliman, John" <john.hurliman@intel.com> Wed, 02 December 2009 20:19 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 BD8C03A6833 for <ogpx@core3.amsl.com>; Wed, 2 Dec 2009 12:19:27 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.598
X-Spam-Level:
X-Spam-Status: No, score=-6.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 sp3YyQG4OYKU for <ogpx@core3.amsl.com>; Wed, 2 Dec 2009 12:19:25 -0800 (PST)
Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by core3.amsl.com (Postfix) with ESMTP id 9AA793A6829 for <ogpx@ietf.org>; Wed, 2 Dec 2009 12:19:25 -0800 (PST)
Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 02 Dec 2009 12:19:17 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos; i="4.47,316,1257148800"; d="scan'208,217"; a="218080894"
Received: from rrsmsx603.amr.corp.intel.com ([10.31.0.57]) by azsmga001.ch.intel.com with ESMTP; 02 Dec 2009 12:19:17 -0800
Received: from rrsmsx506.amr.corp.intel.com ([10.31.0.39]) by rrsmsx603.amr.corp.intel.com ([10.31.0.57]) with mapi; Wed, 2 Dec 2009 13:19:17 -0700
From: "Hurliman, John" <john.hurliman@intel.com>
To: "ogpx@ietf.org" <ogpx@ietf.org>
Date: Wed, 2 Dec 2009 13:19:13 -0700
Thread-Topic: (Not) serializing LLSD default values
Thread-Index: AcpzjLcF/A8cvNIJSGyBMn8GmmabEQ==
Message-ID: <62BFE5680C037E4DA0B0A08946C0933D99B9116B@rrsmsx506.amr.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: multipart/alternative; boundary="_000_62BFE5680C037E4DA0B0A08946C0933D99B9116Brrsmsx506amrcor_"
MIME-Version: 1.0
Subject: [ogpx] (Not) serializing LLSD default values
X-BeenThere: ogpx@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual Worlds and the Open Grid Protocol <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: Wed, 02 Dec 2009 20:19:27 -0000

I'm considering a change in the C# LLSD implementation (OpenMetaverse.StructuredData) to skip serialization of default values inside maps. For example, the following structure:

{
    "zero":0,
    "one":1,
    "empty_string":"",
    "hello_string":"hello world"
}

Would become:

{
    "one":1,
    "hello_string","hello world"
}

>From my reading of the draft (and our current implementation), those two serializations should be equivalent. Do the current Linden Lab implementations handle that correctly? The only problem I see with the C# implementation is that it would make some incompatible typecasts work when they shouldn't. For example, the receiving end could then read key "zero" as an LLSD array and it would work, where the value "0" usually shouldn't be convertible to an array. So it assumes some level of coherence between the sender and receiver, which I think is acceptable.

I would look at the source of the other implementations myself, but the last time I checked the PHP implementation was sorely out of date and the C++ implementation was not under a liberal license.

John