Hm... I don't see any option for now... extending annotation is a nice thing, can you register a ticket in JIRA?
2014-05-30 17:53 GMT+02:00 Dimitris Mouchritsas <dimitris.mouchrit...@eurodyn.com>: > Hi all, > > I'm using struts2-core 2.3.16.3 along with struts2-json-plugin and I have > the following problem: > > I have an entity bean, say Event which has the following 3 properties: > id, dateCreated and data > > data is already a json string saved in the database. > e.g.: > Event data: > {"id":1003,"username":"admin3","email":"t...@example.com","lastname":"Lastname","f_user_type":1,"firstname":"Firstname","password":"fdhfdfh"} > > Now in my struts2 action I have a List<Event> gridModel which I feed to a > jquery grid. > > My problem is that the data property string is being escaped, e.g: > > {"JSON":"success","actionErrors":[],"actionMessages":[],"someId":"3","destination":null,"errorMessages":[],"errors":{},"fieldErrors":{},"gridModel":[{"data":"{\"id\":1,\"username\":\"admin\",\"email\":\"ad...@example.com\",\"lastname\":\"Lastname\",\"f_user_type\":1,\"firstname\":\"Firstname\",\"password\":\"***\"}","dateCreated":"2014-05-30T18:15:10","id":46009},{"data":"{\"id\":1002,\"username\":\"admin2\",\"email\":\"t...@example.com\",\"lastname\":\"Lastname\",\"f_user_type\":1,\"firstname\":\"Firstname\",\"password\":\"****\"}","dateCreated":"2014-05-30T18:15:10","id":46010},{"data":"{\"id\":1004,\"username\":\"admin4\",\"email\":\"t...@example.com\",\"lastname\":\"Lastname\",\"f_user_type\":1,\".... > > > Is there any way to avoid this escaping? What alternatives do I have? > One idea is to just return a tiles plugin and create the json string by hand > in a jsp. > > From what I've seen @JSON annotation does not have the option to skip > escaping. This might be nice. > > Regards > Dimitris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org