in json, unlike php, a comma after the last array element is not allowed