8
这是我从Programming Erlang, 2nd Ed
学到的东西之一,但似乎并没有对外壳未定义功能地图:to_json/1
$ erl
Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Eshell V6.2 (abort with ^G)
1> Dic = #{b => 1, a => 2}.
#{a => 2,b => 1}
2> maps:to_json(Dic).
** exception error: undefined function maps:to_json/1
3>
工作,有什么不对吗?