Re: [netmod] JSON encoding for presence container (empty)
Ram P <polisetty_ram@yahoo.com> Thu, 28 April 2022 20:09 UTC
Return-Path: <polisetty_ram@yahoo.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C945BC1594AC for <netmod@ietfa.amsl.com>; Thu, 28 Apr 2022 13:09:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yqXs8vUGkzs0 for <netmod@ietfa.amsl.com>; Thu, 28 Apr 2022 13:09:15 -0700 (PDT)
Received: from sonic306-2.consmr.mail.bf2.yahoo.com (sonic306-2.consmr.mail.bf2.yahoo.com [74.6.132.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D9605C1594AB for <netmod@ietf.org>; Thu, 28 Apr 2022 13:09:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1651176553; bh=C68GZIhXJiPYTZczfhk3s/ZdN/Rjp/whjnwGdT/bRag=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=RszVTM8N/FqR8GoT+kmlL7fgk2o0lPoh9LONgQBRaA61mpbr/m5vZaVQtJ//kdX3oaGTJuA7Q90BufJvNcnxIXx0KJqyANXnDKN7k7D7imyYOWi8jLHRVRJVjBshi+CVzwefDvSb63Dd0lamK+BpoCeYMAa2PRKuF3nTKggeP6FJ9BlAArzzXOszfdPKP9WY8kPvgPGCt7CbynjluS/7Y0YMLNwiT123nnzpDpHugw3dTZZQwsWUm+Xoy0UNk1tY5opizMGrSj2GfKOM2hhh5169XYMdDdYQyNCQtuJIC2YG7tIrg6l7AoFmQFxe4K99GvHCojNkPjriLQmHkcv2eA==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1651176553; bh=j3wVRpPMzTk0CL9Z/mUIb4OZBudqsr0KsVbC1zX3x4x=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=Ipd1OJJ3Hb/CtEc+f5DQZojnlcVYsKEJpM6jvSI4p3U4RVwwIj8MleDBhxgy/bVH8leckzHmp8NZjk/SfRRaHNzuc2MSNKr2z3skv6Z7w5eH7DhCXvMwhUY8pGMXVUjnVlGjgaBnIBtFlZtzDKNHzBC3bU53zkZDshf4yF/3HIumQ5QnAbKXc8Qf9jMlsuEfKo6YULmHrRf3JBhaJCU7hjOzaHWbOGbtKIx+TuqhD2uIufzetENgYwdxerGDQDbjJTz3alJ8gaWH3k7sGjFFBNUv5ZWymqKaqvHoAYRb+JKFGR/04iHpWtPtlovfKzRp7W8Qw00jyqyHmBVNbDOn3A==
X-YMail-OSG: W7buMFoVM1nfLYNRxc7IpDGzw9DU2ZbkLwOBxDhRXNvGo0jEvq6FaLLhzynabXi EOEyC_QSK5UKM_NDuHRpAbEnGs_Nj4Q8kAq7sVVFLLby0wDXKJdoTxX2Nba4Lc035oVFUxiwZbSA XiZ63fMB4ZXFryGAVsAPAuuIjRKtsq2Z_g81s50dMxtA._TCgIYBc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1lAxBl HVGqPyt9qssk94sIE3qiRid8jsiYqX7FfAOi21L2.kKf1l4EC9t6Q12YCsneXY1M_Npz044ehGGH 2YVWHERN58ddrBvql9tjjqeGdNlHozcb_yNOYHO3UE5cB7Drak5wZOMNGAa1lS_ECF5TFh.QfNqS RtJwg2mlekfKEZGADeykUw1yHljnkgszggCKp4RYRydJhfDorv222hxSTfqMSKoBjx.pKHTmkihO byEDAetgVpJ.LIeltjjoxvDxmFbNCl3wWv9Ba4JBq.GswuQ.1SN3YalRAXapNs86wqkp0Zw5Y65g i1skxZKaLdr.wGXxD4DWAV2W.iEIn4ICX1aOZNRznDA48cZ_tC23C3ox51tyUc8C.2_HFwAiO2ps 6HcuYKZACMVl9TGRGqBv.AMmMn4fvzLLCuaqHf_x6__C9Wb5DEQAKI417wfkWBjAoQ.tQsSyS.CR njCzU2ZSO2HpU0VBQknhXDT1FTXrenciVURbW8PvhCaKrnmWg0hUEZxsgWh9gve85hsEq1np8J11 iUu9WWDZ_okZnVH3uXvBof_BQYlyHZgQq6vG8.EwIauSlpEMjockzdxLeG5kahYiZAR71C7nwiqR WVK3n7v6ay6gY3CA__EM12WuxPEFyu.60VM9vWK8URsxgJDmpKf5uqt58AUowK4znmtG0WfF_uHM kFQHrHpwb5aK9pNixJZ8eOD7fYE2gw2QUfI5BNSgBVX3vnA1JKqaptsvQyTW9yPyA2NP.3j46ImM c0ziQWQyDXyTQVXUmebOBvn4QHmyRmsIBiC9647KOCVCOwqTuWs3wdFrcZVe0R.MQwnFDM.lniNa yvQAEquEhdVaQHItT8we1_u4DUO1qi48KdsKY1eny0A9VqPG0i6MWy04t.LSSX1V4y6P80vAo9lr S2Ib_TFtKDrBKOWaAlno7L7IFKGN4gCy7zBL9g1PnkYsGG3iNmZd.8X0As.52doX.IP6mvDjg6IT 9EkEnMWDg2Ht9lRi8aSu1ZW5ex9mxcuTrSU9tim0la03COoWVGxeMgqDx2ieJpA--
X-Sonic-MF: <polisetty_ram@yahoo.com>
Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Thu, 28 Apr 2022 20:09:13 +0000
Date: Thu, 28 Apr 2022 20:08:52 +0000
From: Ram P <polisetty_ram@yahoo.com>
To: Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Message-ID: <353719101.1433858.1651176532861@mail.yahoo.com>
In-Reply-To: <20220428173238.mtzl5zmakyyzudk3@anna>
References: <1266323059.1389344.1651164642642.ref@mail.yahoo.com> <1266323059.1389344.1651164642642@mail.yahoo.com> <20220428173238.mtzl5zmakyyzudk3@anna>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_1433857_1367744350.1651176532858"
X-Mailer: WebService/1.1.20118 YMailNorrin
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/qh3Hmuo2dP25gZYHsCHr51N8fsQ>
Subject: Re: [netmod] JSON encoding for presence container (empty)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.34
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: <https://mailarchive.ietf.org/arch/browse/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: Thu, 28 Apr 2022 20:09:19 -0000
The Yang definition: container system { description "Contains various system parameters."; container services { description "Configure externally available services."; container "ssh" { presence "Enables SSH"; description "SSH service-specific configuration."; // more leafs, containers, and stuff here... } } } So for this XML: <system> <services> <ssh/> </services> </system> Should the JSON encoding should be like below? "system" : { "services" : { "ssh": {} }} Regards,Ram On Thursday, April 28, 2022, 11:03:04 PM GMT+5:30, Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de> wrote: On Thu, Apr 28, 2022 at 04:50:42PM +0000, Ram P wrote: > Hi, > As per: RFC 7950 - The YANG 1.1 Data Modeling Language > > | > | > | | > RFC 7950 - The YANG 1.1 Data Modeling Language > > The YANG 1.1 Data Modeling Language (RFC 7950) > | > > | > > | > > <system> > <services> > <ssh/> > </services> > </system> > > What is the JSON equivalent for <ssh/> above? > Should it be "ssh" : [null] or "ssh":{}? Looks like RFC 7951 does not specifically mention this. > The answer depends on how <ssh/> is defined. If it is a YANG leaf of type empty, then section 6.9 applies. If it is defined as a container, then section 5.2 applies. Once you have the YANG definition, then RFC 7951 may have the answer. /js -- Jürgen Schönwälder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany Fax: +49 421 200 3103 <https://www.jacobs-university.de/>
- [netmod] JSON encoding for presence container (em… Ram P
- Re: [netmod] JSON encoding for presence container… Jürgen Schönwälder
- Re: [netmod] JSON encoding for presence container… Ram P
- Re: [netmod] JSON encoding for presence container… Jürgen Schönwälder