manage numeric value for JSON conversion