Selaa lähdekoodia

Document new encoding and decoding options

return-trailer
Paul J. Davis 10 vuotta sitten
vanhempi
commit
3458b79cac
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. +7
    -0
      README.md

+ 7
- 0
README.md Näytä tiedosto

@ -42,6 +42,11 @@ The options for decode are:
* `return_maps` - Tell Jiffy to return objects using the maps data type * `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 on VMs that support it. This raises an error on VMs that don't support
maps. maps.
* `{null_term, Term}` - Returns the specified `Term` instead of `null`
when decoding JSON. This is for people that wish to use `undefined`
instead of `null`.
* `use_nil` - Returns the atom `nil` instead of `null` when decoding
JSON. This is a short hand for `{null_term, nil}`.
`jiffy:encode/1,2` `jiffy:encode/1,2`
------------------ ------------------
@ -62,6 +67,8 @@ The options for encode 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 generate before yielding back to the VM. The bytes that Jiffy will generate 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.
* `escape_forward_slashes` - Escapes the `/` character which can be
useful when encoding URLs in some cases.
Data Format Data Format
----------- -----------

Ladataan…
Peruuta
Tallenna