I have registered it in my Spring MVC controller like:
Whenever i make an AJAX call to this controller the setAsText() method gets called and works fine. The problem is with getAsText() method which is not getting called when the server responds with a JSON string.
Please guide. What am i missing?
It does not matter how many times you fall,what matters is how many times you stand back.
Not knowing for sure. My guess would be that PropertyEditors in Spring are mainly if only used to convert String to some format. But not the other way around. So I think the incoming String is being converted to the type, but it won't try to use the PropertyEditor on the way out. For that I would think you need to use a Convertor in Jackson. Meaning I think it is Jackson that doesn't try to convert it from a string. Not Spring at all.