From 2e3021da0cc062e8770839718fa63fb7ac8bcf11 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 14 Apr 2018 20:09:56 -0700 Subject: [PATCH] json: Be precise by default. --- ext/native/json/json_writer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/native/json/json_writer.cpp b/ext/native/json/json_writer.cpp index 7e628ab0ec..54cb503aa6 100644 --- a/ext/native/json/json_writer.cpp +++ b/ext/native/json/json_writer.cpp @@ -6,6 +6,8 @@ JsonWriter::JsonWriter(int flags) { pretty_ = (flags & PRETTY) != 0; str_.imbue(std::locale::classic()); + // Let's maximize precision by default. + str_.precision(53); } JsonWriter::~JsonWriter() {