Hello, I'm writing a rest datasnap server with (c++builder 10.2) and some methods that return a JSon Dataset. In the methods I have a code similar as the below: TJSONObject* TServerMethods1::RetrieveData(parameters) { MyFDQuery->Close(); MyFDQuery->SQL .. MyFDQuery->Open(); .. TFDJSONDataSets *ds = new TFDJSONDataSets(); TFDJSONDataSetsWriter::ListAdd(ds, MyFDQuery); TFDJSONInterceptor::DataSetsToJSONObject(ds, obj); return obj; } And in the client I have a code like the below: foo { TJSONObject * LJSONObject (ClientModule1->ServerMethods1Client->RetrieveData(parameters)); std::auto_ptrLDataSets(new TFDJSONDataSets()); TFDJSONInterceptor::JSONObjectToDataSets(LJSONObject, LDataSets.get()); TFDAdaptedDataSet * LDataSet = TFDJSONDataSetsReader::GetListValue(LDataSets.get(), 0); MemTable->AppendData(*LDataSet); } All work fine, now I need to read the dataset without using c++builder/delphi, I tried with Html5builder but seems have problems with the SSL connection. Anyway I need to read the dataset with PHP/Javascript. When the method is called using a classic rest call (I used the methods invoker with a web-browser) the page get a result similar as the below: {"xy":"eJy9mm9sG2cZwB\/nj5s6f+pmWZctbfZuXVjCGsd2uzYtIPViX7JbHdvzXbIMPtCrc2mtOT7PcUqH\r\n..."} There is a way to decode the above without radstudio tools? I wouldn't create new methods that give the recordset in 'pure' json, if is possible. Thank you for the answers.
↧