- 元祖列表转map
jsx:decode(<<"{\"ip\":\"127.0.0.1\", \"port\":4032}">>). [{<<"ip">>,<<"127.0.0.1">>},{<<"port">>,4032}] maps:from_list(jsx:decode(<<"{\"ip\":\"127.0.0.1\", \"port\":4032}">>)). #{<<"ip">> => <<"127.0.0.1">>,<<"port">> => 4032} jsx:decode(<<"{\"device_id\":1,\"protocol\":\"modbus_tcp\"}">>, [return_maps]). #{<<"device_id">> => 1,<<"protocol">> => <<"modbus_tcp">>}
-
二进制转原子
binary_to_atom(D, utf8)
Erlang 格式转换
于 2023-03-01 15:47:11 首次发布