Richard Holland
Richard Holland

Reputation: 2683

DataSnap XE returning TJSONObject as a string if json-min.js is replaced by json2.js to fix jQuery mobile

json-min.js breaks some libraries such as jQuery mobile. The work around is to replace the file with json2.js and replace js/* occurrences of toJSONString with JSON.stringify().

The Fix: https://forums.embarcadero.com/thread.jspa?threadID=53872

However, doing this makes typeof serverMethods().mymethod() return 'string' instead of 'object'.

Has anyone come across this issue and found a solution?

Upvotes: 1

Views: 671

Answers (1)

Richard Holland
Richard Holland

Reputation: 2683

My solution was to copy the js files generated from XE2. I'm not yet using XE2 in production BUT it is fixed in XE2 and copying the files did work.

Upvotes: 1

Related Questions