zoukankan      html  css  js  c++  java
  • erlang-jiffy 安装手记

    今天安装 erlang-jiffy 把握逼疯,不过最后还是成功了。

    错误避免:

    1. rebar只能再英文目录下运行,如果编译jiffy的目录中有中文或其它unicode字符,将会出错
    2. 从git release 下下来的编译出错,具体原因不明

    解决方案,从git 克隆下来最新代码进行编译

    > git clone https://github.com/davisp/jiffy.git

    >cd jiffy

    >make

    最后将整个 jiffy目录复制到erlang的lib目录下,或自己添加搜索路径即可,下面是一些简单测试:

    4> Term = jiffy:decode("{"head":{"status":"result","type":"command","timestamp":2342435234},"body":{}}").
    {[{<<"head">>,
    {[{<<"status">>,<<"result">>},
    {<<"type">>,<<"command">>},
    {<<"timestamp">>,2342435234}]}},
    {<<"body">>,{[]}}]}
    5> Json = jiffy:encode(Term).
    <<"{"head":{"status":"result","type":"command","timestamp":2342435234},"body":{}}">>
    6> io:format("~s",[Json]).
    {"head":{"status":"result","type":"command","timestamp":2342435234},"body":{}}ok

  • 相关阅读:
    移动端picker插件
    腾讯云主机如何使用root账号登录,不能使用root登录怎么办
    windows安装composer总结
    ubuntu安装git
    workman
    权限设计
    app接口
    git提交流程简述
    mysql分区partition详解
    html元素拖拽
  • 原文地址:https://www.cnblogs.com/jimmysue/p/4209084.html
Copyright © 2011-2022 走看看