Hello there, I am using struts JSON plugin to do some ajax requests. And I am facing a problem with org.apache.struts2.json.JSONValidationInterceptor. Everything works fine as long as my validation error messages do not contain single quotes. When there are quotes, the client side library "crashes" because it does not seem to be able to parse the generated JSON. Here is the JSON: { "fieldErrors": { "password": [ "Password isn\'t correct" ] } }
The problem comes from the escaped quote. Apparently, not all JSON implementations accept escaped single quotes. I can get rid of the client side error by creating a new interceptor, inheriting from org.apache.struts2.json.JSONValidationInterceptor, and overriding the buildResponse(ValidationAware) function to not escape single quotes. But that does not seem to be a good solution in the long run. Does someone have a better solution? Thank you :) Mael. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org