Include documentation on the maps feature
Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/c45f312b Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/c45f312b Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/c45f312b Branch: refs/heads/master Commit: c45f312b501961eb2167973f0e74ce9faad8b656 Parents: eb70deb Author: Paul J. Davis <[email protected]> Authored: Mon Jun 16 21:52:32 2014 -0500 Committer: Paul J. Davis <[email protected]> Committed: Mon Jun 16 21:52:32 2014 -0500 ---------------------------------------------------------------------- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/c45f312b/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 15b2ee3..a609b77 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,9 @@ The options for decode are: * `{bytes_per_iter, N}` where N >= 0 - This controls the number of bytes that Jiffy will process before yielding back to the VM. The mechanics of this yield are completely hidden from the end user. +* `return_maps` - Tell Jiffy to return objects using the maps data type + on VMs that support it. This raises an error on VMs that don't support + maps. `jiffy:encode/1,2` ------------------ @@ -79,6 +82,11 @@ Data Format {[]} -> {} -> {[]} {[{foo, bar}]} -> {"foo": "bar"} -> {[{<<"foo">>, <<"bar">>}]} {[{<<"foo">>, <<"bar">>}]} -> {"foo": "bar"} -> {[{<<"foo">>, <<"bar">>}]} + #{<<"foo">> => <<"bar">>} -> {"foo": "bar"} -> #{<<"foo">> -> <<"bar">>} + +N.B. The last entry in this table is only valid for VM's that support +the `maps` data type (i.e., 17.0 and newer) and client code must pass +the `return_maps` option to `jiffy:decode/2`. Improvements over EEP0018 -------------------------
