Skip to content

This module strives to prepare an EEP0018 implemenation (for Erlang <-> json interaction)

License

Notifications You must be signed in to change notification settings

tradingview/erlang-json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

erlang-json

Json library for Erlang.

Features

  • eep-0018 style decoded term.
  • can decode map key in atom (default is binary).
  • implemented in NIF.
  • c-style comments acceptable (/* ... */) (default is denied).
  • bigint supported (larger than 64bit word).

Compiling

$ make

Assuming rebar works for you that should build everything. Yay.

Testing

$ make check

Hopefully the tests pass.

Usage

Put this app in your Erlang path.

$ erl -pa ebin/
Erlang R15B (erts-5.9) [source] [64-bit] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9  (abort with ^G)
1> json:decode(<<"{\"foo\": true}">>).
{ok,{[{<<"foo">>,true}]}}
2> json:encode([true, 1.2, null]).
{ok,<<"[true,1.2,null]">>}

Yeah. It's that easy.

Repository

About

This module strives to prepare an EEP0018 implemenation (for Erlang <-> json interaction)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 75.6%
  • Erlang 24.4%