Fixed bug in JsonSerializer when sometimes a ',' too much was added