question: private static MetricValue number_to_metric_value_ ( Number elem ) { if ( elem == null ) return MetricValue . EMPTY ; final String num = elem . toString ( ) ; try { return MetricValue . fromIntValue ( Long . parseLong ( num ) ) ; } catch ( NumberFormatException ex ) { } try { return MetricValue . fromDblValue ( Double . parseDouble ( num ) ) ; } catch ( NumberFormatException ex ) { } return MetricValue . fromStrValue ( num ) ; }
target:  Work around for Google gson parser emitting numbers as 'lazily parsed' numbers.