Adding a toJSON method for projects itself