aboutsummaryrefslogtreecommitdiff
path: root/json/json_spirit_writer_template.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-10 19:21:17 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-10 19:21:17 +0000
commit342e1b73385cac5a5b2fc7316d82a2b55b3a85d4 (patch)
tree779fde91134f080040a38214ce53fc75c01f1360 /json/json_spirit_writer_template.h
parent94cfec07fd302c9ff9b6a80c47418d4fe56596ae (diff)
json-spirit print reals with 8 decimal places,
bitcoind help <command> instead of bitcoind <command> -? git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@126 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'json/json_spirit_writer_template.h')
-rw-r--r--json/json_spirit_writer_template.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/json/json_spirit_writer_template.h b/json/json_spirit_writer_template.h
index c993756555..90d2ae69d2 100644
--- a/json/json_spirit_writer_template.h
+++ b/json/json_spirit_writer_template.h
@@ -124,8 +124,11 @@ namespace json_spirit
case str_type: output( value.get_str() ); break;
case bool_type: output( value.get_bool() ); break;
case int_type: output_int( value ); break;
- case real_type: os_ << std::showpoint << std::setprecision( 16 )
+
+ /// Bitcoin: Added std::fixed and changed precision from 16 to 8
+ case real_type: os_ << std::showpoint << std::fixed << std::setprecision(8)
<< value.get_real(); break;
+
case null_type: os_ << "null"; break;
default: assert( false );
}