Closed jeremey closed 12 years ago
I like the idea and I think it will be useful. However your change violates interface contracts.
The interfaces explicitly say: converting one Erlson dict to/from one JSON object. In addition to -specs, there are runtime checks verifying that.
In order to do this in a clean way, you would need to add 4 new functions: list_from_json_array
, list_to_json_array
, list_from_json_term
and list_to_json_term
. Their implementation is trivial and clean.
this functionality was submitted and merged as a new separate pull request
erlson doesn't currently support encoding or decoding bare JSON arrays. It would be nice to use erlson exclusively and not bounce between it and mochijson2. This change implements support for bare JSON arrays and doesn't break anything I've tested.