Subject: [httpapi] draft-wilde-linkset-07 JSON attribute ordering in internationalized target attributes

From: Ian Griffiths <[email-masked]>
Date: Wed, 28 Oct 2020 11:39:36 +0000

In draft-wilde-linkset-07 , "Section 4.2.4.2.  Internationalized Target Attributes" seems to indicate that the order of attributes of JSON objects representing the value of
an internationalized target attribute is significant:

> The name of the first member of such JSON object is "value" [...].  The name of the
> optional second member of such JSON object is "language" "

The use of "first" and "second" here seems to imply that a value of this form does not conform to the specification:

  { "language": "de", "value": "nachstes Kapitel" }

because the attributes are in the wrong order.

Is it the intention that this be considered wrong? That might be problematic because some popular JSON handling mechanisms make it difficult or impossible for developers to control the order in which attributes are emitted. If the use of "first" and "second" here isn't meant to impose an ordering requirement, it might be worth considering rewording this. But if there is an ordering requirement, it might be good to make that clearer.

-- 
Ian Griffiths
endjin.com