SmartClient Version: v10.0p_2015-06-02/LGPL Development Only (built 2015-06-02)
I have my own custom data source (DSProtocol.CLIENTCUSTOM). When handling the FETCH operation I have a server call that is returning JSON data. I the routine I want to call processResponse and it seems like I need a DSResponse. It also seems like the correct thing to do is fill in the data in the response by calling setData with a list of ListGridRecord objects. My problem is how to convert from the JSON data to an array of ListGridRecords. I've written my own code to do this conversion using a combination of JSON.decode and XMLTools.selectObjects, but when measuring the performance of my code that does this, it is significantly slower than when I don't use CLIENTCUSTOM (i.e., using the built-in code to do the conversion). Is there a way I can call a method to leverage the built-in code to do this conversion for me instead of needing to write me own?
I have my own custom data source (DSProtocol.CLIENTCUSTOM). When handling the FETCH operation I have a server call that is returning JSON data. I the routine I want to call processResponse and it seems like I need a DSResponse. It also seems like the correct thing to do is fill in the data in the response by calling setData with a list of ListGridRecord objects. My problem is how to convert from the JSON data to an array of ListGridRecords. I've written my own code to do this conversion using a combination of JSON.decode and XMLTools.selectObjects, but when measuring the performance of my code that does this, it is significantly slower than when I don't use CLIENTCUSTOM (i.e., using the built-in code to do the conversion). Is there a way I can call a method to leverage the built-in code to do this conversion for me instead of needing to write me own?
Comment