Json commas position
Lately I found that this way of structure Json fields:
var foo = {
"string 1"
, "string 2"
, 3
}
is really much more comfortable than the classic one:
var foo = {
"string 1",
"string 2",
3
}
where you are more likely to forget to deal with commas.
In the first case, it is less error prone because you are lees likely to cancel the first field than the last. Also the way it looks is improved! Of course, there will be who will prefer the second approach to the first, but is always subjective. I started to appreciate the first!
Written by MeerKatDev
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Related Tags
#json
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#