I'm having problems with ColdFusion and JSON. My users have file names and other keywords with characters such as ç in them, which hurts me when I have to pass them through JSON.
When I use the magic JSON command for my variable:
<cfcontent type="application/json"> <cfset variables.stGalleryItem = StructNew() /> <cfset variables.stGalleryItem["imagePath"] = siteRoot & '/images/350460/hellç.txt' /> <cfset variables.stGalleryItem["title"] = 'çççç' /> <cfset variables.stGalleryItem["author"] = 'HI' /> <cfset variables.stGalleryItem["text"] = 'aa' /> <cfset ArrayAppend(variables.arrGallery,variables.stGalleryItem) /> <cfoutput> #Trim(SerializeJSON(variables.arrGallery))# </cfoutput>
The character who spits out is that that doesn't help anyone.
Is there anything I can do to save my users ç ?
json coldfusion coldfusion-9
Jarede
source share