Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Bugfix: RestDataSource with useStrictJSON=true doesn't work.

$
0
0
How to produce:

use RestDataSource with properties: useStrictJSON=true, jsonPrefix=null;

try to execute queued transaction (don't know how to explicitly call that, but in my case it was automatically then one data source was referring to another using field with foreignKey).

I've tracked down where the problem is and found simple typing error:

bug is in RPCManager.js: _performTransactionReply() function 4226 line:
Code:

4224: if (useStrictJSON) {
4225:    transaction.results =
4226:      isc.Class.parseStrictJSON(structuredResponse, jsonReviverFunction);
4227: } else {

passed wrong variable, must be `restResponse` instead of `structuredResponse`


As workaround use useStrictJSON=false; instead, but response is eval`ed instead of parsed by JSON.parse()

affected all versions below:
SmartClient_v100p_2014-11-12_LGPL


Btw, thank You very much for this beautiful framework! It made a job 10x easier.

Viewing all articles
Browse latest Browse all 4756

Trending Articles