On Wed, Oct 1, 2014 at 3:08 AM, Juergen Schoenwaelder < [email protected]> wrote:
> On Tue, Sep 30, 2014 at 04:31:03PM -0400, Y. Richard Yang wrote: > > > A particular example of using key-value map is the network-map, which is > > defined as a key-value store to enforce that each named endpoint address > > group has a unique name. A specific example is in Section 11.2.1.7 of RFC > > 7285 (http://www.rfc-editor.org/rfc/rfc7285.txt): > > > > "network-map" : { > > "PID1" : { > > "ipv4" : [ > > "192.0.2.0/24", > > "198.51.100.0/25" > > ] > > }, > > "PID2" : { > > "ipv4" : [ > > "198.51.100.128/25" > > ] > > }, > > "PID3" : { > > "ipv4" : [ > > "0.0.0.0/0" > > ], > > "ipv6" : [ > > "::/0" > > ] > > } > > Since YANG's native encoding is XML, how would you represent this in > XML with the restriction that XML element names are defined by the > data model and all values are in XML elements? > Would you consider this as a limitation of the restriction? With the restriction, if we have the YANG data type to introduce key-value store, for XML, the Mapping Rule may still be that of using two elements with name and value: pid-name = (or just key as name), pid-value = (or value). But for json and languages that support maps, the mapping does not. Make sense? Richard > > /js > > -- > Juergen Schoenwaelder Jacobs University Bremen gGmbH > Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany > Fax: +49 421 200 3103 <http://www.jacobs-university.de/>
_______________________________________________ alto mailing list [email protected] https://www.ietf.org/mailman/listinfo/alto
