| Index: third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h b/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h
|
| index 761a0a1087bc9372cdaa087f0690427b82a56594..cb7e2fb30c4fec5b621f720de734be48250cfbb9 100644
|
| --- a/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h
|
| +++ b/third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h
|
| @@ -90,9 +90,10 @@ class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
|
| JsonObjectWriter(StringPiece indent_string,
|
| google::protobuf::io::CodedOutputStream* out)
|
| : element_(new Element(NULL)),
|
| - stream_(out), sink_(out),
|
| - indent_string_(indent_string.ToString()) {
|
| - }
|
| + stream_(out),
|
| + sink_(out),
|
| + indent_string_(indent_string.ToString()),
|
| + use_websafe_base64_for_bytes_(false) {}
|
| virtual ~JsonObjectWriter();
|
|
|
| // ObjectWriter methods.
|
| @@ -111,6 +112,10 @@ class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
|
| virtual JsonObjectWriter* RenderBytes(StringPiece name, StringPiece value);
|
| virtual JsonObjectWriter* RenderNull(StringPiece name);
|
|
|
| + void set_use_websafe_base64_for_bytes(bool value) {
|
| + use_websafe_base64_for_bytes_ = value;
|
| + }
|
| +
|
| protected:
|
| class LIBPROTOBUF_EXPORT Element : public BaseElement {
|
| public:
|
| @@ -195,6 +200,10 @@ class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
|
| ByteSinkWrapper sink_;
|
| const string indent_string_;
|
|
|
| + // Whether to use regular or websafe base64 encoding for byte fields. Defaults
|
| + // to regular base64 encoding.
|
| + bool use_websafe_base64_for_bytes_;
|
| +
|
| GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(JsonObjectWriter);
|
| };
|
|
|
|
|