https://github.com/benoitc/ejson
EJSON - decode and encode JSON into/from Erlang terms (from CouchDB project)
https://github.com/benoitc/ejson
Last synced: 11 months ago
JSON representation
EJSON - decode and encode JSON into/from Erlang terms (from CouchDB project)
- Host: GitHub
- URL: https://github.com/benoitc/ejson
- Owner: benoitc
- License: apache-2.0
- Created: 2011-04-07T21:50:32.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2016-10-06T14:05:16.000Z (over 9 years ago)
- Last Synced: 2025-04-09T10:07:20.653Z (11 months ago)
- Language: C
- Homepage:
- Size: 380 KB
- Stars: 32
- Watchers: 5
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
**NOTICE: This repository is unmaintained**
#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]">>