Don't silently fail, jsonEncode
Don't sum NaNs and Infs

cbugg: close bug-449