forked from radiospiel/eep0018
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
53 lines (33 loc) · 1.64 KB
/
README
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
50
51
52
53
Changes to davisp's EEP0018:
1. yajl_encode_string() adds an option "encode_utf8". If true, valid UTF-8 sequences are
encoded to \uXXXX format, otherwise are output as is. Invalid sequences are still encoded
to \u00XX format.
2. encode_json.c. The following erlang terms are encoded to json maps:
* {[ {K,V}, ... ]}, this is the original one.
* [ {K,V}, ... ], simplified notation
* {struct, [{K,V}, ...]}, this is mochijson2's notation.
still, [] is mapped to empty json array. {[]} means empty json map.
3. Rewrite eep0018.erl according to Driver's Efficiency Guide.
4. Simple makefile, no need to use autoconf mechanism.
===========================================
This module strives to prepare an EEP0018 implemenation. It implements most of the
functionality described there, with some additional features.
YAJL
====
The parsing engine that drives behind that module is YAJL, see http:https://lloydforge.org/projects/yajl/.
The source tree contains a copy of that library, currently at version 0.4.0.
Differences to EEP 18
=======================
EEP 18's json_to_term function defines parsing of JSON objects. As CouchDB
needs a JSON parser that is able to parse JSON values this implementation adds
this functionality.
Implemenation Status
====================
The current development is done on OS/X 10.5. Other OSes might need a tuned
Makefile.
Critical Discussion
===================
For a critical discussion of JSON <-> Erlang interaction see here:
http:https://fullof.bs/prototype-eep-18-considered-harmful-the-problems-with-erlang-to-json-term-translation#more-402
and
http:https://sc.tri-bit.com/outgoing/scjson%20parser%20halp.html