22 Jun
2012
22 Jun
'12
2:06 p.m.
On Jun 21, 2012, at 9:30 PM, Ovid wrote:
I don't have the time to fix this right now, but we had a very interesting issue. I had this line in my code:
info "Bidding on auction $id", $bid;
That turned out to be a massive bug!
$bid is a hashref that gets serialized to JSON. Unfortunately, the act of printing out the data flipped one value from an NV (float) to a PV (string). That caused the JSON serializer render 1.2 as "1.2".
I too would like to see this work correctly. For now, I simply traverse the entire data structure and multiply each numeric value by 1 to ensure it doesn't get stringified when converted to JSON. -- Puneet Kishor