aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/internal/json_objectwriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/util/internal/json_objectwriter.h')
-rw-r--r--src/google/protobuf/util/internal/json_objectwriter.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/google/protobuf/util/internal/json_objectwriter.h b/src/google/protobuf/util/internal/json_objectwriter.h
index c8a061d5..ebfc7fba 100644
--- a/src/google/protobuf/util/internal/json_objectwriter.h
+++ b/src/google/protobuf/util/internal/json_objectwriter.h
@@ -38,6 +38,8 @@
#include <google/protobuf/util/internal/structured_objectwriter.h>
#include <google/protobuf/stubs/bytestream.h>
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
namespace util {
@@ -82,7 +84,7 @@ namespace converter {
// uint64 would lose precision if rendered as numbers.
//
// JsonObjectWriter is thread-unsafe.
-class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
+class PROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
public:
JsonObjectWriter(StringPiece indent_string, io::CodedOutputStream* out)
: element_(new Element(/*parent=*/nullptr, /*is_json_object=*/false)),
@@ -115,7 +117,7 @@ class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
}
protected:
- class LIBPROTOBUF_EXPORT Element : public BaseElement {
+ class PROTOBUF_EXPORT Element : public BaseElement {
public:
Element(Element* parent, bool is_json_object)
: BaseElement(parent),
@@ -146,7 +148,7 @@ class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
Element* element() override { return element_.get(); }
private:
- class LIBPROTOBUF_EXPORT ByteSinkWrapper : public strings::ByteSink {
+ class PROTOBUF_EXPORT ByteSinkWrapper : public strings::ByteSink {
public:
explicit ByteSinkWrapper(io::CodedOutputStream* stream) : stream_(stream) {}
~ByteSinkWrapper() override {}
@@ -165,7 +167,7 @@ class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
// Renders a simple value as a string. By default all non-string Render
// methods convert their argument to a string and call this method. This
// method can then be used to render the simple value without escaping it.
- JsonObjectWriter* RenderSimple(StringPiece name, const string& value) {
+ JsonObjectWriter* RenderSimple(StringPiece name, const std::string& value) {
WritePrefix(name);
stream_->WriteString(value);
return this;
@@ -210,7 +212,7 @@ class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
std::unique_ptr<Element> element_;
io::CodedOutputStream* stream_;
ByteSinkWrapper sink_;
- const string indent_string_;
+ const std::string indent_string_;
// Whether to use regular or websafe base64 encoding for byte fields. Defaults
// to regular base64 encoding.
@@ -224,4 +226,6 @@ class LIBPROTOBUF_EXPORT JsonObjectWriter : public StructuredObjectWriter {
} // namespace protobuf
} // namespace google
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_UTIL_CONVERTER_JSON_OBJECTWRITER_H__