Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error converting Data to JSON in ColdFusion

I have an application that has MS SQL Server as the backend database, ColdFusion server and front end is Angular. I am getting the following error when trying to retrieve data from a few tables in the database. It doesn't impact all data but only a few tables

message=JSON serialization failure: Unable to serialize binary data to JSON

Code to serialize data:

<cfset responseString = serializeJSON( apiResponse.data )>

Any ideas how to resolve this issue?

like image 793
sc09 Avatar asked Aug 02 '26 09:08

sc09


1 Answers

I was able to resolve the issue with Miguel's direction. The SQL Server database included a few tables which were migrated from another Access database and these tables included a column named SSMA_Timestamp. The value in this column was a binary one. I cleansed the database and queries to exclude this column and all worked fine.

Thanks to @Miguel-F for a quick response.

like image 71
sc09 Avatar answered Aug 04 '26 01:08

sc09



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!