Fixed the pretty print bug with an extra comma in the json output, now it looks to see if the last property is undefined