By Guest on Wednesday, 09 November 2022
Posted in General
Replies 4
Likes 0
Views 1K
Votes 0
Hi,

One of our developers uses your component set for transport and says that we cannot use the { or } symbols within strings as this breaks the JSON component, is there no escape char enabled for esegece to ensure that { can be used safely?

Thanks for the assistance.
I should have clarified that it causes an access violation if you broadcast to a channel starting with the { char.
·
1 year ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

If you replace the "{" with "\{" doesn't works? If doesn't works, just send me a sample code and I will test here.

Kind Regards,
Sergio
·
1 year ago
·
0 Likes
·
0 Votes
·
0 Comments
·
On the server:
Connection.DoSubscribe('{A467C487-AC66-41C8-8EBE-F8026F741EC7}');

And in OnMessage:
Server.Broadcast('hello', '{A467C487-AC66-41C8-8EBE-F8026F741EC7}');

An AccessViolation is generated OnLoadBalancerError: Access violation at address 006BE20E in module 'LoadBalancer.exe'. Read of address 00000000
·
1 year ago
·
0 Likes
·
0 Votes
·
0 Comments
·
On the server:
Connection.DoSubscribe('{A467C487-AC66-41C8-8EBE-F8026F741EC7}');

And in OnMessage:
Server.Broadcast('hello', '{A467C487-AC66-41C8-8EBE-F8026F741EC7}');

An AccessViolation is generated OnLoadBalancerError: Access violation at address 006BE20E in module 'LoadBalancer.exe'. Read of address 00000000


Hello,

The methods DoSubscribe and Broadcast doesn't make use of the internal JSON component, except, if the LoadBalancer is enabled (LoadBalancer.Enabled = true). If the LoadBalancer is enabled, then the message is converted to a JSON string, so the use of "{" or "}" should be escaped.
Are you really using a Load Balancer? if yes, how it's configured? attach a sample if possible because I've tested and I don't see this error.

Kind Regards,
Sergio
·
1 year ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post