public
Description: A Rison encoder/decoder written in Erlang
Homepage: http://tfletcher.com/dev/erlang-rison
Clone URL: git://github.com/tim/erlang-rison.git
erlang-rison / README.txt
100644 49 lines (30 sloc) 0.891 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
============
erlang-rison
============
 
 
What is this?
-------------
 
A Rison encoder/decoder written in Erlang.
 
 
What is Rison?
--------------
 
A data serialization format optimized for compactness in URIs.
 
See http://mjtemplate.org/examples/rison.html for more information.
 
 
How do I use it?
----------------
 
To convert Rison-formatted strings into Erlang terms, use rison:load/1.
To do the opposite, use rison:dump/1. For example:
 
  1> rison:load("!t").
  {ok, true}
 
  2> rison:load("!(1,2,3)").
  {ok,{array,[1,2,3]}}
 
  3> rison:load("123.456e789").
  {ok,{number,123,'456',789}}
 
  4> rison:load("abc def").
  {error,invalid_input}
 
  5> rison:dump({array,[1,2,3]}).
  {ok,"!(1,2,3)"}
 
  6> rison:dump({object,[{a,0}]}).
  {ok,"(a:0)"}
 
  7> rison:dump({}).
  {error,invalid_input}
 
 
Type "make i" to compile the code and get an Erlang shell where you
can try out these examples.