[ColdBox - 4.3.0] event.renderData JSON converts "Yes" to true

I have a similar problem with serializeJSON but I was able to create a User Function to get around that.

Does anyone know how to modify

<cfset event.renderData( type=“JSON”, data=StructWithYesInIt ) />

so that it doesn’t convert that “Yes” to true? or should I just change the type to plain text and make the JSON myself?

That’s what you get for using Adobe ColdFusion. :slight_smile: Switch to Lucee Server, which has never had this issue, or upgrade to ACF 2018 which finally copied Lucee in retaining original datatypes. This is a well known issue with JSON serialization in Adobe. See this blog post for more info:


Thanks, Brad! Looking at that blog post, it sounds like we poor Adobe users might get some relief in the next release! :slight_smile:

You can also use a custom JSON serializer, I think there is a CFC out there from Ben Nadel that accomplishes this.