fix fuckup in previous commit: in json, unlike php, a comma after the last array element is not allowed