3 ms·
If the syntax allows for a trailing separator, I'd go with opening delimiters and separators on the right, with a trailing separator, and the closing delimiter
by Karellen 4y ago
If the syntax allows for a trailing separator, I'd go with opening delimiters and separators on the right, with a trailing separator, and the closing delimiter on its own line.
The reasoning behind that is that it produced the cleanest diffs with source control - especially if you consider changing the first/last/only entry in a collection.
Consider the diff from removing the first phone number from your collection above, and compare that to removing it from
"phoneNumbers": [
"212 555-1234",
"646 555-4567",
],