Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
EJSON - decode and encode JSON into/from Erlang terms (from CouchDB project)
C Erlang Perl
branch: master

Make sure doubles parse as doubles

Simple check that doubles are serialized in such a way that they'll by parsed as doubles by most implementations.

sync with couchdb
latest commit 3b81c6a55a
@benoitc authored
Failed to load latest commit information.
c_src Make sure doubles parse as doubles
src use strings instead of atom. close #5 .
t
.gitignore initial release of ejson. make couchdb json module standalone.
AUTHORS initial release of ejson. make couchdb json module standalone.
LICENSE initial release of ejson. make couchdb json module standalone.
Makefile make sure ./rebar eunit don't fail. These tests aren't eunit test so put
NOTICE
README.md add README
THANKS initial release of ejson. make couchdb json module standalone.
rebar update ejson to latest rebar
rebar.config update ejson to latest rebar

README.md

ejson

decode and encode JSON into/from Erlang terms using Elang NIF library if available.. This the module used in CouchDB project ported a standalone module with rebar support.

Build

$ make

Testing

$ make check

All tests should pass

Usage

Put this app in your Erlang path.

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

Eshell V5.7.5  (abort with ^G)
1> ejson:decode(<<"{\"foo\": true}">>).
{[{<<"foo">>,true}]}
2> ejson:encode([true, 1.2, null]).
<<"[true,1.2,null]">>
Something went wrong with that request. Please try again.