学习:erlang的term反序列化,string转换为term
一、
string_to_term(String) ->
case erl_scan:string(String++".") of
{ok, Tokens, _} ->
case erl_parse:parse_term(Tokens) of
{ok, Term} -> Term;
_Err -> undefined
end;
_Error ->
undefined
end.