Support customized MagicWord
Closed this issue · 2 comments
wbzhong-hello commented
Is it possible to add customized MagicWord to separated individual requests or responses when constructing the connection, while '\t'
is used as the default MagicWord. There are some cases where '\t'
is contained in the object.
ruidfigueiredo commented
Can you tell me a little bit more about this? The separator character is an actual TAB and not '\t'. As far as I know the TAB character is not valid in JSON so it should not occur in the payload
wbzhong-hello commented
Thanks for the reply. You're right! I thought JSON would keep the escape character. It actually doesn't.
var myTabSeparatedMsg = 'Hello\tWorld'; JSON.stringify(myTabSeparatedMsg).indexOf('\t'); //returns -1