Qin Wu <bill...@huawei.com> wrote: > -----邮件原件----- > 发件人: netmod [mailto:netmod-boun...@ietf.org] 代表 Ladislav Lhotka > 发送时间: 2018年10月10日 20:41 > 收件人: Martin Bjorklund; netmod@ietf.org > 主题: Re: [netmod] xpath expressions in JSON > > Martin Bjorklund <m...@tail-f.com> writes: > > > Hi, > > > > While reviewing restconf-notif, I saw this example: > > > > { > > "ietf-subscribed-notifications:input": { > > "stream": "NETCONF", > > "stream-xpath-filter": "/ds:foo/", > > "dscp": "10" > > } > > } > > > > Note the "stream-xpath-filter". It has a prefix in the XPath string. > > How are prefixes declared when JSON is used? > > > > The leaf "stream-xpath-filter" says: > > > > o The set of namespace declarations are those in scope on > > the 'stream-xpath-filter' leaf element. > > > > (I think I provided that text...) > > > > This assumes that the encoding is XML, or at leas that the encoding > > can somehow transfer namespace declarations. > > It can't. There are two options: > > 1. have different representations of this value in XML and JSON, > analogically to instance indentifiers (sec. 6.11 in RFC 7951). > > [Qin]: This has been brought up before: > https://www.ietf.org/mail-archive/web/netconf/current/msg15501.html
That is a slightly different problem; how to represent an *instance-identifier* in a RESTCONF URL. /martin > > 2. use a module name rather than a prefix in XML, too. > > I would suggest #2. > > Lada > > > > > How is this supposed to work with JSON? > > > > > > /martin > > > > _______________________________________________ > > netmod mailing list > > netmod@ietf.org > > https://www.ietf.org/mailman/listinfo/netmod > > -- > Ladislav Lhotka > Head, CZ.NIC Labs > PGP Key ID: 0xB8F92B08A9F76C67 > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod