Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: Why is ColdFusion adding backslashes to my Concatenated string?

$
0
0

No I am not using JSStringFormat() anywhere

 

I ran a simple test.

I took out the loop and set:

<cfset ActionsList = '{"success" : "true"}'>

 

When I return that I get:

 

{"Success" : "true"}

 

 

 

So to further test I set:

<cfset ActionsList = '{"Success" : "true"}, {"Test" : "test"}'>

 

When I return that i get:

 

"{\"Success\" : \"true\"}, {\"Test\" : \"test\"}

And yes I realize that is not valid JSON

 

So it seems like the problem is the Comma.

 

When there is a comma in the string Coldfusion auto-escapes the double-quotes.

 

Anyone have a solution for this?


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>