My memory tells me that the compiler doesn't even complain if you leave the last unnecessary comma in the code
No your memory is lying to you.
In these situations I have used a small processing program to read the data file and print it out with comers and braces.
Then I simply copy from the processing window and paste into the arduino IDE.