Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Javascript generated JSON vs CF generated JSON

$
0
0

Hello, all,

 

I've got a few pages that I'm working on where, after the page loads, I use Javascript to dynamically create a form, then use CF to convert a query object to JSON, insert that into the form, and submit it (as opposed to running the same query twice), and the action page will DeserializeJSON()  to generate an Excel spreadsheet from the query.

 

These pages are all working flawlessly.

 

Now, I'm trying to do the same thing, except insead of using CF to convert a query into JSON, I'm creating a Javascript JSON of the data to pass to the form.  But when the page submits, DeserializeJSON() isn't working, even though I'm using the same format that CF uses.

 

I'm getting the following error:

JSON parsing failure: Expected ',' or ']' at character 60721:'M' in ... (JSON string)

 

Well, at almost 100,000 characters, I'm having trouble finding that position (Word is useless for this), so can't view the issue directly.  However, I'm wondering if anyone knows a way to take a Javascript JSON string and format it so that CF can deserialize it.

 

V/r,

 

^_^


Viewing all articles
Browse latest Browse all 5794

Trending Articles



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