| 332 | } |
| 333 | |
| 334 | String JsonWriter::convertDoubleToString( double value ) |
| 335 | { |
| 336 | std::stringstream s; |
| 337 | s << std::fixed << std::setprecision( JSONWRITER_PRECISION ) << value; |
| 338 | String str = String( s.str() ).trimZerosFromRight(); |
| 339 | |
| 340 | // Add .0 for integers for some JSON parsers. |
| 341 | if ( !str.contains( "." ) ) |
| 342 | str += String( ".0" ); |
| 343 | return str; |
| 344 | } |
| 345 | |
| 346 | String JsonWriter::convertDoubleArrayToString( const double *arr, unsigned size ) |
| 347 | { |
nothing calls this directly
no test coverage detected