OS : Windows Java Version : 11.0.15 Tomcat Version : 9.0.45 Lucee Version : 5.3.9.141
I am currently trying to migrate over our application from ACF to Lucee, we have multiple rest services returning json objects.
When we first switched to lucee it was clear that the rest services were now being stringified to something resembling "{\"MESSAGE\":\"Cabbages\",\"STATUS\":201}"
This is not what we want as we need to be returning json objects
I agree it seems that serialization seems to be happening twice, however in ACF it doesn’t happen twice and I would like to keep the same code functional on both platforms for now, is there a way I can alter the method to not default to serialize twice?
Can you point us at the docs for ColdFusion that say you need to do the JSON serialisation yourself in these situations? I didn’t think you had to, but I’ve not touched this stuff in close to a decade. I seemed to recall that one just returned the object from the function, and the CFML REST engine handles the serialisation if you have told it to return JSON or XML…?
If there is a behavioural difference between CF and Lucee here, a compat ticket should be raised in Lucee’s Jira, yeah?