1 person found this helpful
Is it possible that the POST size exceeds what is set in the "Maximum size of post data" setting in CFAdmin (not likely as I think it defaults to 20MB or something like that)? Is the JSON being submitted using POST or GET (GET uses URL parameters and there is a limit to how big a GET request can be)? Or maybe the web server (IIS or Apache) is truncating the data?
Have you checked the JSON being transmitted via Developer Tools or a tool like FIddle or Charles? Is it being truncated before it even gets to ColdFusion?
The JSON is being submitted in its entirety, confirmed by Fiddler. And it's actually being successfully saved to a SQL Server nvarchar(MAX) field too. I can validate that saved JSON.
I'm actually grabbing the JSON to convert directly from the SQL Server, and your comments / thoughts led me down the path of resolution.
Turns out that the JSON was being truncated prior to getting to the DeserializeJSON command, but it was the cfquery pull that was doing the truncating. The fix was to enable "long text retrieval (CLOB)" for this datasource in CF Admin. I'd never run into that before or even knew that this setting existed.
Thanks again for your comments!
Glad you got that sorted. CLOB issues eventually bite most of us at some point.
What a rare finding: a practical application of one of the esoteric settings. Please kindly mark your response as the correct answer. It will surely help someone else in future.
@Carl Von Stetten
Say what! CLOB issues eventually byte most of us at some point!
I see what you did there.