summaryrefslogtreecommitdiff
path: root/components/rvi_common
diff options
context:
space:
mode:
authorUlf Wiger <ulf@feuerlabs.com>2015-12-15 17:54:29 -0800
committerUlf Wiger <ulf@feuerlabs.com>2015-12-15 17:54:29 -0800
commitce9b50c4d6b9710f67300b5a848a10aa77961d36 (patch)
treee51da386c0cde86af2a3d2511fe4841e3414064a /components/rvi_common
parentd0da97015667246a6e4a7c7cca335e2082ae1166 (diff)
downloadrvi_core-ce9b50c4d6b9710f67300b5a848a10aa77961d36.tar.gz
wrong encoding of 'mod' attr in 'rcv' msg
Diffstat (limited to 'components/rvi_common')
-rw-r--r--components/rvi_common/src/rvi_common.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/rvi_common/src/rvi_common.erl b/components/rvi_common/src/rvi_common.erl
index 0b54d53..1c4540f 100644
--- a/components/rvi_common/src/rvi_common.erl
+++ b/components/rvi_common/src/rvi_common.erl
@@ -124,7 +124,7 @@ json_argument([], [], Acc) ->
lists:reverse(Acc);
json_argument([Arg | AT], [Spec | ST], Acc) when is_atom(Arg)->
- json_argument(AT, ST, [ { Spec, atom_to_list(Arg) } | Acc]);
+ json_argument(AT, ST, [ { Spec, atom_to_binary(Arg, latin1) } | Acc]);
json_argument([Arg | AT], [Spec | ST], Acc) ->
json_argument(AT, ST, [ { Spec, Arg } | Acc]).
@@ -162,7 +162,7 @@ request(Component,
?debug("Sending ~p:~p(~p) -> ~p.", [Module, Function, InArg, JSONArg]),
case get_request_result(
- send_json_request(URL, atom_to_list(Function), JSONArg)
+ send_json_request(URL, atom_to_binary(Function, latin1), JSONArg)
) of
{ ok, JSONBody} ->
@@ -330,7 +330,7 @@ get_json_element_([], JSON) ->
%% All proplist keys in JSON are strings.
%% Convert atomically provided path elements to strings
get_json_element_([Elem | T], JSON ) when is_atom(Elem) ->
- get_json_element_([atom_to_list(Elem) | T], JSON);
+ get_json_element_([atom_to_binary(Elem, latin1) | T], JSON);
get_json_element_(Path, {Type, JSON}) when Type==array;
Type==struct ->