I am trying to preload some data using the angular-ui-router resolve method. I am getting the data back from my cfc, but the data being return isn't in a correctly formatted JSON.
Here is the actual data, just junk data right now. Also the white space preceding the json isn't showing up:
"[{\"category_id\":1,\"name\":\"etsaaf\"},{\"category_id\":2,\"name\":\"test2\"},{\"category_id\":3,\"name\":\"test3\"},{\"category_id\":4,\"name\":\"testadsfa\"},{\"category_id\":5,\"name\":\"rob\"},{\"category_id\":6,\"name\":\"teadgafd\"},{\"category_id\":7,\"name\":\"asdfasd\"}]
I ran into the \"
issue before, and it was setting the return type to json and using the serializejson
method in the cfreturn
call. I'm not using either, but I am using the iknowkungfoo array collection cfc to properly format my json.
I fixed the issue, by <cfreturn deserializeJSON(response)/>
. Could someone shed some light on why they string was getting serialized twice? But all the extra white space is still here.