]> git.proxmox.com Git - librados2-perl.git/blobdiff - PVE/RADOS.pm
use json format by default
[librados2-perl.git] / PVE / RADOS.pm
index 5f6e0f084005d4fa9d17363fa3da3706b2d1490e..d3794509c46304e81a58b8637f5b671573ec7eb1 100644 (file)
@@ -69,6 +69,8 @@ sub cluster_stat {
 sub mon_command {
     my ($self, $cmd) = @_;
 
+    $cmd->{format} = 'json' if !$cmd->{format};
+
     my $json = encode_json($cmd);
     my $raw = pve_rados_mon_command($self->{conn}, [ $json ]);
     if ($cmd->{format} && $cmd->{format} eq 'json') {