added to_json to View class