Add toJSON method to collections

No need to return `toArray` here, but should we?