[netmod] xpath expressions in JSON

Martin Bjorklund <mbj@tail-f.com> Wed, 10 October 2018 11:16 UTC

Return-Path: <mbj@tail-f.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 BC780130ED3 for <netmod@ietfa.amsl.com>; Wed, 10 Oct 2018 04:16:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=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 NCMb7hXyihOB for <netmod@ietfa.amsl.com>; Wed, 10 Oct 2018 04:16:16 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 665F9130ED9 for <netmod@ietf.org>; Wed, 10 Oct 2018 04:16:13 -0700 (PDT)
Received: from localhost (unknown [173.38.220.61]) by mail.tail-f.com (Postfix) with ESMTPSA id D57011B03A00 for <netmod@ietf.org>; Wed, 10 Oct 2018 13:16:10 +0200 (CEST)
Date: Wed, 10 Oct 2018 13:16:10 +0200
Message-Id: <20181010.131610.1510095762179710072.mbj@tail-f.com>
To: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/5qRC1VqO58b7vXbNm3DVednpxtY>
Subject: [netmod] xpath expressions in JSON
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 10 Oct 2018 11:16:18 -0000

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.

How is this supposed to work with JSON?


/martin