[netmod] metadata in JSON

Ladislav Lhotka <lhotka@nic.cz> Mon, 28 July 2014 09:08 UTC

Return-Path: <lhotka@nic.cz>
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 283E11A0330 for <netmod@ietfa.amsl.com>; Mon, 28 Jul 2014 02:08:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham
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 X-FdjGNWnofh for <netmod@ietfa.amsl.com>; Mon, 28 Jul 2014 02:08:53 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 726511A031F for <netmod@ietf.org>; Mon, 28 Jul 2014 02:08:53 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by trail.lhotka.name (Postfix) with ESMTP id E3F635406C1 for <netmod@ietf.org>; Mon, 28 Jul 2014 11:08:50 +0200 (CEST)
Received: from trail.lhotka.name ([127.0.0.1]) by localhost (trail.lhotka.name [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id awYEQzJYvEMn for <netmod@ietf.org>; Mon, 28 Jul 2014 11:08:45 +0200 (CEST)
Received: from localhost (unknown [172.29.2.201]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by trail.lhotka.name (Postfix) with ESMTPSA id A55CC54014A for <netmod@ietf.org>; Mon, 28 Jul 2014 11:08:45 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: netmod@ietf.org
User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.50.2 (x86_64-apple-darwin13.0.0)
Date: Mon, 28 Jul 2014 11:08:43 +0200
Message-ID: <m27g2xdf50.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: http://mailarchive.ietf.org/arch/msg/netmod/-8oBlGpCSn-IbULnQkurcdBng-E
Subject: [netmod] metadata in 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: Mon, 28 Jul 2014 09:08:59 -0000

Hi,

as I mentioned in Toronto, the mapping of XML attributes to JSON cannot
represent namespaces of attributes, which is IMO a serious deficiency.

Now, since YANG 1.1 issue Y33 (add "attribute" statement) was shot DEAD,
we need to find another way for attribute namespace encoding.

Peter Saint-Andre once proposed a generic method in the expired draft

http://tools.ietf.org/html/draft-saintandre-json-namespaces-00

For example,

<flag xmlns:ex="http://example.com" ex:foo="a">true</flag>

would be mapped as follows:

"flag": true,
"@flag": {
  "{http://example.com}foo": "a"
}

This is of course not very nice as namespace URIs will often be longer
than in this example. Any other suggestions?

Thanks, Lada

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C