-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
JSONUtil has been working pretty well with ColdFusion 2016 using the strictMapping=true option, but I've noticed that boolean values (deserialized true/false values from JSON or Javacast("boolean") values in a serialized object) are converted to text strings.
Is this intentional or a bug?
I've been integrating formBuilder into some projects. It's a jQuery/Angular client-side generator that uses JSON for building, creating, validating and rendering forms. I've had to add a routine to preserve true/false boolean values from being converted to strings when serializing.
response = variables.JSONUtil.SerializeJSON(var=inputVar, strictMapping=true);
response = response.replaceAll("(?i)""true""", "true").replaceAll("(?i)""false""", "false");
Other than this issue, JSONUtil works well for me and enables JSON results in CF2016 to be more correct and consistent with CF2018.
Metadata
Metadata
Assignees
Labels
No labels