couchbeam icon indicating copy to clipboard operation
couchbeam copied to clipboard

couchbeam_ejson decode broken for nested map values

Open iambumblehead opened this issue 10 years ago • 1 comments

> couchbeam_ejson:decode(#{<<"map">> => #{"nestedmap" => "val"}}).
** exception throw: {invalid_json,badarg}
     in function  couchbeam_ejson:decode/1 (src/couchbeam_ejson.erl, line 41)

I use this file as a work-around: https://github.com/iambumblehead/childmaps/blob/master/src/childmaps.erl

The problem manifests for me when trying to persist map data. The error is shown and data is not persisted unless all maps are converted to lists first.

iambumblehead avatar Jan 01 '15 21:01 iambumblehead

couchbeam does not yet support maps but only proplists unfortunately. This is planned for the next releae which should happen sometimes this month.

benoitc avatar Jan 02 '15 09:01 benoitc