Is it possible to change the ACF2021 serialization...
# adobe
e
Is it possible to change the ACF2021 serialization to behave like ACF2016's? More info...
Taking a look at this running under 21: https://trycf.com/gist/7780764e700b879cca4dc86aa5fa7431/acf2021?theme=monokai And in ACF2016 https://trycf.com/gist/275b0f6c7e000edcb4e5ef63e8f09d7a/acf2016?theme=monokai The difference is that
"1"
is converted to a boolean in 2016 and maintained as a string in 2021. This is actually good and an improvement. However, it means many changes in the app that I am upgrading and I am wondering if there is an EASY, lazy man's way out to make the serialization behave like 2016's? This is not using any framework, it's using a simple
serializeJSON()
to serve CF structures. I am aware that I could probably create an aspect for the JSON responses, or use CFC serialization metadata, or change the code, but like I said is there an easy way out to try and implement and run the Unit tests against it, until someone goes through the code properly?
n
@evagoras: You can try adding this jvm flag in cfusion/bin/jvm.config file and restart ColdFusion server: -Dcoldfusion.literal.preservetype=false
❤️ 1
e
@nimitsharma spot on! That did the trick. Thank you so much for this.