2012/10/12 Shaun Lim <shaunthegr...@gmail.com>: > I'm using Struts2 with the rest-plugin to build a RESTful web services. > Serializing from Java objects to JSON was a breeze - everything mapped > correctly and beautifully. Receiving JSON and attempting to map it to Java > objects is a whole different issue. > > I ran into 2 problems: > > 1) Could not convert JSON array to List. "Solved" it by using String[] > instead. > > 2) There's an ENUM is the JSON like so: > > {"feature":{"id":2,"enabled":true,"description":"one click transactions > feature","type":"ONECLICK_OPTIN_TRANSACTIONS"},"countries":["SG"],"clientId":10} > > "type" : "ONECLICK_OPTIN_TRANSACTIONS" should map to an ENUM in the Java > object, but of course, Struts2 barfs instead. > > Has anyone successfully done this?
It should be doable, could you prepare a small Maven based demo app ? Thanks in advance -- Ćukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org