I've been working a lot with Delphi XE's DataSnap REST Server projects. I prepared a white paper for Embarcadero, and some introductory videos, and will host a webinar for the company in a couple of weeks (details should be made available soon). I'm also developing a couple of real world projects and building an add-in library (to be called "Delphi Rest Plus" or "Dwarf, Delphi Web Application Rest Framework" or soe other name I still have to figure out...). But that's for another post. Before I get to the actual topic, let me underline I like this new Delphi XE architecture a lot, but it is only a good foundation you have to build more on top.
So, getting to this specific post, if you want to take advantage of jQuery and some of its plug-ins in a Delphi XE DataSnap REST Server application, you should replace the JSON processing library that Embarcadero picked and that is causing lots of incompatibilities. That is the json-min.js file, an open source library by Brenton Fletcher. The specific issues I've had was with the "jQuery validation plug-in 1.7" (http://bassistance.de/jquery-plugins/jquery-plugin-validation/).
In ServerFunctionsExecutor.js you have to change (around line 150) the first line below with the second:
contentParam = contentParam.toJSONString(); // original contentParam = JSON.stringify(contentParam); // new
and (around line 180) you have to fix:
JSONResultWrapper = responseText.parseJSON(); // original JSONResultWrapper = JSON.parse (responseText); // new
The first change (JSON.stringify for toJSONString) has to be done also in the ServerFunctionsInvoker.js file.
That's all for now, but stay tuned for other fixes and improvements to Delphi's REST support... and for the Embarcadero webinar.
PS. Still two more days only for the Extra Discount for Delphi Developer Days Europe: http://www.delphideveloperdays.com/.