I have RESTFUL webservices built using Spring and right now I am getting data using JDBC from the database. There are some sensitive information that I would like to hide. For example, for SSN, I would like to write it like ###-##-####, similarly for name and date of birth. I am wondering how should I proceed , is there any way to hide information using my existing Java webservice so that on the UI side, I could show only hidden details?

Thanks