refactor set visibility to use jackson