Re: [netmod] attributes in draft-lhotka-netmod-yang-json
Andy Bierman <andy@yumaworks.com> Wed, 26 March 2014 14:20 UTC
Return-Path: <andy@yumaworks.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DA7061A0343 for <netmod@ietfa.amsl.com>; Wed, 26 Mar 2014 07:20:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id axLNPP4KG6CP for <netmod@ietfa.amsl.com>; Wed, 26 Mar 2014 07:20:01 -0700 (PDT)
Received: from mail-qg0-f49.google.com (mail-qg0-f49.google.com [209.85.192.49]) by ietfa.amsl.com (Postfix) with ESMTP id CF3031A033F for <netmod@ietf.org>; Wed, 26 Mar 2014 07:20:00 -0700 (PDT)
Received: by mail-qg0-f49.google.com with SMTP id z60so909944qgd.36 for <netmod@ietf.org>; Wed, 26 Mar 2014 07:19:59 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=pWr8um2FXtdWpn9B6hCqr2ua8IEEtoNT9BkuyRibPpc=; b=XxTvywvuf68mfxnYXMXeKBPX5Lcfkb8qR+YAwfKkOZ9EhQWa0RyW1SA7wcCkM7kWzw i+q8Glh4L9XRYgBAs+60Rt+/t3rP29XUpsuGKy9X5zonoaVGWhgbpBGItJqP3LXwv1Qw 2crfRfmBTUQeirhrXw5+s4GVXiM3zSqSdyYd7uTvHNA9i+GoY2bYt6D9kkScEX9nlxlM L2QT60PqEqCphfhzbnkKiaLRnb4XkQC94GMOzNE9gnoGXMMwkXM5PlEHM2hnVOmmH2sX KsJjD5X9e4g3muJH76MUGA4ydSx1AoUAfRJSRlfEtiRCSsoHax3kjdh7rKfCYk0kiUUq rdiQ==
X-Gm-Message-State: ALoCoQkmkOKf6cI0hqM+37TYTufA/zOwi2rvlOV5XWXYbj8W7Iatq4Hz7cNYVaJvY497cJvJMXg/
MIME-Version: 1.0
X-Received: by 10.140.27.193 with SMTP id 59mr84825274qgx.18.1395843599182; Wed, 26 Mar 2014 07:19:59 -0700 (PDT)
Received: by 10.140.104.194 with HTTP; Wed, 26 Mar 2014 07:19:59 -0700 (PDT)
In-Reply-To: <A169C9A0-970B-4F7B-B102-61543EE553BD@nic.cz>
References: <CABCOCHQdE5JwJBrQpGx_eFxr8ijGvKr0-_OuTUiPZH_bX+a1FQ@mail.gmail.com> <20140326.143440.588668936751872922.mbj@tail-f.com> <m2y4zxysna.fsf@ip-94-113-93-91.net.upcbroadband.cz> <20140326.145737.580242632261637255.mbj@tail-f.com> <A169C9A0-970B-4F7B-B102-61543EE553BD@nic.cz>
Date: Wed, 26 Mar 2014 07:19:59 -0700
Message-ID: <CABCOCHTg5T+k_LzyNz=bwUKC5AS5gYcBVODL4ZUihUWXQbDbkQ@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
To: Ladislav Lhotka <lhotka@nic.cz>
Content-Type: multipart/alternative; boundary="001a11c1233ae45f6504f5832995"
Archived-At: http://mailarchive.ietf.org/arch/msg/netmod/32ntos1GlsJYwoV5ggEdC1m-EIY
Cc: "netmod@ietf.org" <netmod@ietf.org>
Subject: Re: [netmod] attributes in draft-lhotka-netmod-yang-json
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Mar 2014 14:20:03 -0000
On Wed, Mar 26, 2014 at 7:10 AM, Ladislav Lhotka <lhotka@nic.cz> wrote: > > On 26 Mar 2014, at 14:57, Martin Bjorklund <mbj@tail-f.com> wrote: > > > Ladislav Lhotka <lhotka@nic.cz> wrote: > >> Martin Bjorklund <mbj@tail-f.com> writes: > >> > >>> Hi, > >>> > >>> Here's yet another attempt to handle attributes in JSON, without > >>> changing the encoding for the case that there are no attributes > >>> present. > >>> > >>> In all examples, the attributes "inactive" and "etag" are present. > >>> > >>> Attributes are encoded differently depending on the type of object: > >>> > >>> > >>> leaf > >>> ---- > >>> > >>> Encode the attributes as a sibling to the leaf. > >>> > >>> > >>> leaf foo { > >>> type string; > >>> } > >>> > >>> "foo": "some value"; > >>> "@foo": { > >>> "inactive": true, > >>> "etag": "..."; > >>> } > >>> > >>> > >>> list instance > >>> ------------- > >>> > >>> Encode the attributes within the list instance. > >>> > >>> > >>> list bar { > >>> key name; > >>> leaf name { > >>> type string; > >>> } > >>> ... > >>> } > >>> > >>> "bar": [ > >>> { > >>> "@bar": { > >>> "inactive": true, > >>> "etag": "..." > >>> } > >>> "name": "instance name"; > >>> }] > >>> > >> > >> This could be ambiguous: > >> > >> list bar { > >> key name; > >> leaf name { ... } > >> leaf bar { ... } > >> } > >> > >> Then you don't know whether the attributes belong to the list entry > >> or to the contained leaf. > > > > Right. Then we use "@@bar" for the list / container attributes. > > OK, then this scheme is fine with me. > > Looks more complicated than other solution proposals. Looks very cumbersome to implement, especially for leaf-lists. Maybe it will take an interim meeting to figure out how to agree on an attribute encoding for JSON. > Lada > > > > > > > /martin > > > Andy
- [netmod] attributes in draft-lhotka-netmod-yang-j… Dean Bogdanovic
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Ladislav Lhotka
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Martin Bjorklund
- Re: [netmod] attributes in draft-lhotka-netmod-ya… Andy Bierman