Once serialized in JSON, there is little use in making a distinction between a list, a set, and an array. They are all [a, b, c] in the JSON.
The only pieces of information the actual type brings are:
whether the order of elements matters (and thus will be consistent)
whether it is possible to have duplicates
Although it may be useful information in some cases, I would imagine that in most cases, we don't really care. When we don't care, it could be nice to avoid the noise of having different collection names by using a plain array notation like MyType[].
Once serialized in JSON, there is little use in making a distinction between a list, a set, and an array. They are all
[a, b, c]
in the JSON.The only pieces of information the actual type brings are:
Although it may be useful information in some cases, I would imagine that in most cases, we don't really care. When we don't care, it could be nice to avoid the noise of having different collection names by using a plain array notation like
MyType[]
.