summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2020-07-03 10:37:52 +0700
committerMichael Klishin <michael@clojurewerkz.org>2020-07-03 10:37:52 +0700
commitdc53b23824f611541ae42ad0f6977929308e7e20 (patch)
tree8c01df657dc73d4dba8c86c4399b51a0d589fcbf /src
parentdd6915ad86bc11d02bc1ebec5dd681c2da7d19ca (diff)
downloadrabbitmq-server-git-dc53b23824f611541ae42ad0f6977929308e7e20.tar.gz
rabbit_definitions: format exchange, queue and binding arguments the same way HTTP API would
this makes them JSON serialisation-safe without any post-processing of the returned data structure.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_definitions.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_definitions.erl b/src/rabbit_definitions.erl
index 9133ed1392..e9121580b9 100644
--- a/src/rabbit_definitions.erl
+++ b/src/rabbit_definitions.erl
@@ -656,7 +656,7 @@ exchange_definition(#exchange{name = #resource{virtual_host = VHost, name = Name
<<"type">> => Type,
<<"durable">> => Durable,
<<"auto_delete">> => AD,
- <<"arguments">> => Args}.
+ <<"arguments">> => rabbit_misc:amqp_table(Args)}.
list_queues() ->
%% exclude exclusive queues, they cannot be restored
@@ -679,7 +679,7 @@ queue_definition(Q) ->
<<"type">> => Type,
<<"durable">> => amqqueue:is_durable(Q),
<<"auto_delete">> => amqqueue:is_auto_delete(Q),
- <<"arguments">> => maps:from_list(Arguments)
+ <<"arguments">> => rabbit_misc:amqp_table(Arguments)
}.
list_bindings() ->
@@ -696,7 +696,7 @@ binding_definition(#binding{source = S,
<<"destination">> => D#resource.name,
<<"destination_type">> => D#resource.kind,
<<"routing_key">> => RoutingKey,
- <<"arguments">> => maps:from_list(Arguments)
+ <<"arguments">> => rabbit_misc:amqp_table(Arguments)
}.
list_vhosts() ->