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

  • 相关阅读:
    git
    *** errRun
    Centos与Debian的安装命令
    HTML基础
    基本的SQL语言
    phpstudy靶场搭建
    Centos7下搭建服务器(apache+mysql+php)
    Centos7设置yum源
    Linux基础
    一个服务器中搭建多个站点
  • 原文地址:https://www.cnblogs.com/jimmysue/p/4209084.html
Copyright © 2011-2022 走看看