toJson() removed obsolete code