Remove trailing commas from serialized values