I'm working with data via an IBM MQ call where a 0 is returned as +0.0
when this is serialized by ColdFusion 10 (10,0,11,285437) it results in invalid JSON and cannot be deserialized.
stPolicy = { "prem": "+0.0" };
serializedData = serializeJSON(stPolicy);
writeDump(isJSON(serializedData));
writeDump(deserializeJSON(serializedData));
This outputs NO
for isJSON
and an error when trying to deserialize JSON parsing failure at character 9:'+' in {"prem":+0.0}
.
I'm able to work around this by replacing all +0
to 0
, but I'm guessing this is a bug in ColdFusion. Has anyone else had this issue and implemented a better fix?
Bug report filed: Bug #3632972