aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/internal/protostream_objectwriter.h
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-03-29 14:32:48 -0700
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2017-03-29 14:33:05 -0700
commitd36c0c538a545fac5d9db6ba65c525246d4efa95 (patch)
tree3fd29af0f137dfaf5df892723e60600f674392b3 /src/google/protobuf/util/internal/protostream_objectwriter.h
parent4a0dd03e52e09332c8fd0f8f26a8e0ae9f911182 (diff)
Down-integrate from google3.
Diffstat (limited to 'src/google/protobuf/util/internal/protostream_objectwriter.h')
-rw-r--r--src/google/protobuf/util/internal/protostream_objectwriter.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.h b/src/google/protobuf/util/internal/protostream_objectwriter.h
index 732971e1..ab534912 100644
--- a/src/google/protobuf/util/internal/protostream_objectwriter.h
+++ b/src/google/protobuf/util/internal/protostream_objectwriter.h
@@ -76,11 +76,14 @@ class LIBPROTOBUF_EXPORT ProtoStreamObjectWriter : public ProtoWriter {
public:
// Options that control ProtoStreamObjectWriter class's behavior.
struct Options {
- // Treats integer inputs in google.protobuf.Struct as strings. Normally,
- // integer values are returned in double field "number_value" of
+ // Treats numeric inputs in google.protobuf.Struct as strings. Normally,
+ // numeric values are returned in double field "number_value" of
// google.protobuf.Struct. However, this can cause precision loss for
- // int64/uint64 inputs. This option is provided for cases that want to
- // preserve integer precision.
+ // int64/uint64/double inputs. This option is provided for cases that want
+ // to preserve number precision.
+ //
+ // TODO(skarvaje): Rename to struct_numbers_as_strings as it covers double
+ // as well.
bool struct_integers_as_strings;
// Not treat unknown fields as an error. If there is an unknown fields,