Page 1 of 1

JSON - how to access roomId data

Posted: 03 Dec 2009, 15:17
by udikantz
hello Im using JSON to send messages from server to client.

when i receive the messages in the client i catch it in the onExtensionResponse event.

i want to get the roomId from the JSON data,
i see that the room id exists in the JSON data, for example:

Code: Select all

{"t":"xt","b":{"r":17,"o":{"cmd":"rwr","btype":[1],"bwin":[0]}}}
I didn't find a way to access the "r" data,
how do i get the roomId from that data

Posted: 05 Dec 2009, 06:54
by Lapo
The "r" parameter is not accessible from code in the onExtensionResponse handler. If you need to pass yourself room data you should add it to your response object.

Posted: 07 Dec 2009, 10:39
by udikantz
i think you should make the "r" parameter available to read, its a waste to duplicate this parameter like that

Posted: 07 Dec 2009, 10:53
by Lapo
Yes, I agree. I have added it to the to-do list.
Thank you

roomId in extension response

Posted: 12 Oct 2011, 12:51
by yaswanth
Dear Lapo,

Any updates to your todo list? :-)

Is there a way to get the roomId from the extensionResponse other than sending it with the response object?

Regards,
Yaswanth