RTC Forums
April 29, 2024, 10:13:57 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: getting request data using TRtcDataServer(Sender).Read  (Read 3216 times)
JeffW
RTC License+
****
Posts: 7


« on: June 27, 2017, 11:24:52 AM »

Basic question here. I want to use the request data received from a Read (receiving a JSON string) but cannot find anything documenting how to parse it into an object. Response is easy, using
TRtcRecord, so looks like a good approach. How can I get received data into a TRtcRecord? or is there a better alternative?

Apologies for the newbie question.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: June 27, 2017, 12:26:10 PM »

var data:TRtcValue;
begin
If Sender.Request.Complete then
  begin
  data:=TRtcValue.FromJSON(Sender.Read);
  ...


Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.022 seconds with 16 queries.