Fabrice Nordmann

JSONSetElement and smart quotes

Discussion created by Fabrice Nordmann on Apr 17, 2018
Latest reply on Apr 17, 2018 by beverly

If I try:

Let ( myText = "this text \"contains" & char ( 8221 ) & " quotes" ;

list (

    Quote ( myText ) ;

    JSONSetElement ( "" ; "text" ; myText ; JSONstring )

)

)

 

I get:

"this text \"contains\” quotes"

{"text":"this text \"contains” quotes"}

 

which shows that Quote() correctly escapes smart quotes, but JSONSetElement doesn’t.

Outcomes