Corrected a bug where even the last object property contains a comma.