Need consistent JSON serialization for properties with (0,n) + (1,n) cardinality #39
Description
There are a number of fields (and I've noticed a few other more specific issues in this genre) around what to do in the case of fields that can have multiple values.
Examples are:
accessURL,
format,
keyword,
category,
references,
distribution,
feed
Some of these give guidance. "keyword" and "references" both give guidance to use commas to separate values, but many of the other ones don't.
I would propose that for the serialization, all fields that can have an arbitrary number of values should use arrays. Not commas.
That way we can be consistent, and callers don't need to parse strings to get multiple values. They can use the build in JSON constructs.
In addition, the "references" property suggests that URLs should be separated by commas. However, commas are valid characters in URLs. This means that in order to make the mechanism reliable, you need to add another layer of encoding on it, which is an unnecessary burden on developers.