From 3e80f475f5fad80071546f49ace8e72a30df8182 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Mon, 24 Nov 2014 17:27:06 -0800 Subject: [PATCH] document `return_maps` in README --- CHANGES.md | 4 ++++ README.md | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7659348..319341a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +v2.2 + +* `return_maps` option + v2.1.1 * faster generation of json via iolists diff --git a/README.md b/README.md index 0bda564..cfcd7d3 100644 --- a/README.md +++ b/README.md @@ -483,7 +483,7 @@ decode(JSON, Opts) -> Term JSON = json_text() Term = json_term() - Opts = [option() | labels | {labels, Label}] + Opts = [option() | labels | {labels, Label} | return_maps] Label = binary | atom | existing_atom | attempt_atom F = fun((any()) -> any()) ``` @@ -500,6 +500,10 @@ new atoms to the atom table and will result in a `badarg` error if the atom does not exist. `attempt_atom` will convert keys to atoms when they exist, and leave them as binary otherwise +the option `return_maps` will attempt to return objects as maps instead of +proplists. this option has no effect when used with releases that do not +support maps + raises a `badarg` error exception if input is not valid json