Conversation
Co-Authored-By: David Stansby <d.stansby@ucl.ac.uk>
Automated Review URLs |
| **transformations** | ||
| : MUST be an array of wrapped transformations. | ||
| Each item MUST contain `input_axes`, `output_axes` and `transformation` fields. | ||
| : MUST be an array of objects, which MUST contain |
There was a problem hiding this comment.
the reference of "which" may be ambiguous. Should the array or the objects contain the fields?
As only objects have "fields", the latter is assumed. Other suggestions:
-
"MUST be an array of objects, where each object MUST contain the fields
input_axes,output_axes, andtransformation. -
"MUST be an array. Each element MUST be an object containing the fields
input_axes,output_axes, andtransformation.
Also, the JSON spec does not use "field", 4. Objects:
An object structure is represented as a pair of curly brackets
surrounding zero or more name/value pairs (or members). A name is a
string. A single colon comes after each name, separating the name
from the value. A single comma separates a value from a following
name. The names within an object SHOULD be unique.
So if we are being precise...
- "MUST be an array of objects. Each object MUST contain name/value pairs with names
input_axes,output_axes, andtransformation."
or
- "MUST be an array of objects. Each object MUST have members named
input_axes,output_axes, andtransformation."
Risking bikeshedding, yet another option is to use property and define it clearly elsewhere. That is what the JSON Schema spec does in 4.2.1:
object:
An unordered set of properties mapping a string to an instance, from the JSON "object" value
Feel free to split the field/property/member thing into a separate issue, though!
@dstansby PR with your wording change suggestions from here and fixes to some more text style issues (i.e., leftover Python wording instances such as "dictionary")