Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Using backslash to escape a character in a string

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Nov 2019 23:32 Edited at: 4th Nov 2019 00:01
If i use the JSON commands to create a string it will escape double quotes like this \"
However if i try to escape a quote using backslash in a literal i get an error.
quotes as string = "\""
This makes it almost impossible to create a JSON literal if i am using strings
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 4th Nov 2019 03:54
to blink0k
Hi, are you talking about this?
It works for me.
'\\"Hello'
https://www.instagram.com/qugurun/
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Nov 2019 04:02
Unfortunately my string contains both double and single quotes
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 4th Nov 2019 04:07 Edited at: 4th Nov 2019 04:09
' " \' '
https://www.instagram.com/qugurun/

Attachments

Login to view attachments
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Nov 2019 06:13
Unfortunately the JSON processing escapes double quotes AND uses double quotes to start/end the string
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 4th Nov 2019 10:09
Look into the resulting JSON



JSON:
https://www.instagram.com/qugurun/
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Nov 2019 11:18
Thanks for your help QuguRun!

Login to post a reply

Server time is: 2024-04-27 00:34:28
Your offset time is: 2024-04-27 00:34:28