Return-Path: X-Original-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D6B4D7BA0 for ; Thu, 3 Nov 2011 17:39:52 +0000 (UTC) Received: (qmail 87789 invoked by uid 500); 3 Nov 2011 17:39:52 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 87772 invoked by uid 500); 3 Nov 2011 17:39:52 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 87764 invoked by uid 99); 3 Nov 2011 17:39:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 17:39:52 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dug@us.ibm.com designates 32.97.110.154 as permitted sender) Received: from [32.97.110.154] (HELO e36.co.us.ibm.com) (32.97.110.154) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 17:39:43 +0000 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 Nov 2011 11:33:10 -0600 Received: from d03relay02.boulder.ibm.com ([9.17.195.227]) by e36.co.us.ibm.com ([192.168.1.136]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 3 Nov 2011 11:32:32 -0600 Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pA3HWK6g141312 for ; Thu, 3 Nov 2011 11:32:21 -0600 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pA3HWI0I021165 for ; Thu, 3 Nov 2011 11:32:18 -0600 Received: from d03nm119.boulder.ibm.com (d03nm119.boulder.ibm.com [9.17.195.145]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pA3HWGXX021094; Thu, 3 Nov 2011 11:32:17 -0600 In-Reply-To: <1320341039.13424.45.camel@melon.watzmann.net> To: David Lutterkort Cc: deltacloud-dev@incubator.apache.org MIME-Version: 1.0 Subject: Re: Sketch of CIMI model layer X-Mailer: Lotus Notes Release 7.0 HF144 February 01, 2006 From: Doug Davis Message-ID: Date: Thu, 3 Nov 2011 13:32:13 -0400 X-MIMETrack: Serialize by Router on D03NM119/03/M/IBM(Release 8.5.1FP2|March 17, 2010) at 11/03/2011 11:32:16, Serialize complete at 11/03/2011 11:32:16 Content-Type: multipart/alternative; boundary="=_alternative 006054A98525793D_=" x-cbid: 11110317-3352-0000-0000-0000008CF23D X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 006054A98525793D_= Content-Type: text/plain; charset="US-ASCII" Ah - that would be a bug :-) The example in 4.1.10 was just out of sync with the Machine JSON. Will fix. thanks thanks -Doug ______________________________________________________ STSM | Standards Architect | IBM Software Group (919) 254-6905 | IBM 444-6905 | dug@us.ibm.com The more I'm around some people, the more I like my dog. David Lutterkort 11/03/2011 01:23 PM To Doug Davis/Raleigh/IBM@IBMUS cc deltacloud-dev@incubator.apache.org Subject Re: Sketch of CIMI model layer On Thu, 2011-11-03 at 12:52 -0400, Doug Davis wrote: > David Lutterkort wrote on 11/03/2011 12:36:35 PM: > ... > > > > The issue really isn't so much that there is this small difference > > between JSON and XML, but that the rules for the JSON/XML correspondence > > aren't spelled out. Sections 4.1.9 and 4.1.10 in the WIP talk a little > > bit about that, but a slightly more formal (structural induction or so) > > set of rules would definitely ease the mind of any implementor. BTW, > > 4.1.10 contradicts the examples later on, like the one on page 37 for a > > MachineTemplate - 4.1.10 talks about a wrapper property, whereas the > > examples don't have one. > > can you elaborate on the mismatch between 4.1.10 and MachineTemplate? > Which part of MachineTemplate is missing a wrapper? I'd like to fix it. In the WIP[1], section 4.1.10 says that arrays are serialized with a wrapper property "volumes" : [ { "volume": { "href": string }, "attachmentPoint": string, "protocol": string } + ], ? Whereas the example on page 39 has { "uri": string, "name": string, ... "volumes": [ { "href": string, "attachmentPoint": string, "protocol": string }, + ], ? ... } I actually think the second form is a little nicer than the first one; you'd write 'volumes[0].href' rather than 'volumes[0].volume.href'. For serializing back to XML, the second form also seems preferrable, since the serialization only needs to follow two rules * an array property p is serialized as a sequence of elements whose name is the singular of the array property name ('volumes' -> 'volume') * properties of p[i] that are marked as XML attributes in the schema are serialized as attributes on the enclosing tag () * properties of p[i] that are not marked as XML attributes are serialized as child elements. I am sure you can come up with similar rules for the first form, though they aren't quiteas obvious to me ;) David [1] http://dmtf.org/sites/default/files/standards/documents/DSP0263_1.0.0a.pdf --=_alternative 006054A98525793D_=--