[Json] Doofus Parameter Labels

Phillip Hallam-Baker <phill@hallambaker.com> Mon, 30 March 2015 19:39 UTC

Return-Path: <hallam@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com []) by ietfa.amsl.com (Postfix) with ESMTP id 162671A8734 for <json@ietfa.amsl.com>; Mon, 30 Mar 2015 12:39:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.422
X-Spam-Level: *
X-Spam-Status: No, score=1.422 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id Rd8SnMXxNhbv for <json@ietfa.amsl.com>; Mon, 30 Mar 2015 12:39:02 -0700 (PDT)
Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com [IPv6:2a00:1450:4010:c04::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9C0F01A82E2 for <json@ietf.org>; Mon, 30 Mar 2015 12:38:40 -0700 (PDT)
Received: by lbdc10 with SMTP id c10so48496790lbd.2 for <json@ietf.org>; Mon, 30 Mar 2015 12:38:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=HpYSdWTyYjRuaP7zHD5sHApm5+BvPG+5d7IEcmcTZy0=; b=CVNVmSzxAhcNEwN69lDjwoen8a+2Dn7ZlUHKV0NMFy5ijSWh1Fdd2urYVudP3mqIoy BJetZD0uNlJB8TmPpsgqJJfPw2FDfA+fbnlFbkUR8GiK49Ini66W78gQ20Ryut8s4VOP C+p/b/wGx6aWTxd8/Lbi1vroV5rgKHNt88dNgaGJYnHSLNqng8bJAEAWEaZ4FxSBSHB8 yrzhMPw6bzrBwV22kk0y+wCyVDX+kFexSnjpiDQE/2c83bIQNBn6JSE1bcvWnHK835qm ngF11uzyt89O3ug+yScJmWZFp3D72sh0aX/2WPXL3GFQum0didwiNqfSSLWxlznt4YNz X25Q==
MIME-Version: 1.0
X-Received: by with SMTP id k8mr27936005lak.103.1427744319191; Mon, 30 Mar 2015 12:38:39 -0700 (PDT)
Sender: hallam@gmail.com
Received: by with HTTP; Mon, 30 Mar 2015 12:38:39 -0700 (PDT)
Date: Mon, 30 Mar 2015 15:38:39 -0400
X-Google-Sender-Auth: L8I5ECCeKUxuqDxTklCMoyAZrgc
Message-ID: <CAMm+Lwg7UBJO83BN1xBbVsbzgeXa1pbhtiTcPKmMgFX3HcvQEw@mail.gmail.com>
From: Phillip Hallam-Baker <phill@hallambaker.com>
To: JSON WG <json@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/-rGLDcUIqmEqsGVWa1gxeLkiMpo>
Subject: [Json] Doofus Parameter Labels
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Mar 2015 19:39:03 -0000

So, I am implementing an IETF draft which is fairly widely used and
using a code generator to speed things along.

The code is breaking because the spec has decided to use 'protected'
as a tag which is of course a reserved keyword in Java, C# and much

OK so there is an escape feature that I can use instead. But those
don't exist in other languages. And then I come across a tag that has
a non alphanumeric tag value.

This sort of thing is likely to be happening quite a bit now that
people are using JSON and it would be a lot better if we could avoid
it. The fact that JSON allows tags to be any valid UNICODE sequence
does not mean that all choices are equal.

In general it would be good if people writing specs could stick to the
identifier naming rules for C and avoid reserved words from Java, C#,
etc. The languages and tools I use are quite capable of using accented
characters. I have absolutely no clue how to generate them on the
keyboard though.