]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_pubsub_push.cc
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / rgw / rgw_pubsub_push.cc
index 0c13886e01b31b8bf8f39dac66d3048f3da1c949..6b3ecef8df0f29b79212f1371cf262f9e57194f4 100644 (file)
@@ -26,7 +26,13 @@ template<typename EventType>
 std::string json_format_pubsub_event(const EventType& event) {
   std::stringstream ss;
   JSONFormatter f(false);
-  encode_json(EventType::json_type_single, event, &f);
+  {
+    Formatter::ObjectSection s(f, EventType::json_type_plural);
+    {
+      Formatter::ArraySection s(f, EventType::json_type_plural);
+      encode_json("", event, &f);
+    }
+  }
   f.flush(ss);
   return ss.str();
 }