Change toJSON() visiblity to "private"