瀏覽代碼

Include documentation on the maps feature

pull/65/head 0.11.1
Paul J. Davis 11 年之前
父節點
當前提交
c45f312b50
共有 1 個檔案被更改,包括 8 行新增0 行删除
  1. +8
    -0
      README.md

+ 8
- 0
README.md 查看文件

@ -39,6 +39,9 @@ The options for decode are:
* `{bytes_per_iter, N}` where N >= 0 - This controls the number of * `{bytes_per_iter, N}` where N >= 0 - This controls the number of
bytes that Jiffy will process before yielding back to the VM. The bytes that Jiffy will process before yielding back to the VM. The
mechanics of this yield are completely hidden from the end user. 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` `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">>}]} {[{<<"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 Improvements over EEP0018
------------------------- -------------------------

Loading…
取消
儲存