alavrik / erlson

Erlang Simple Object Notation - dynamic name-value dictionary data type and syntax for Erlang
MIT License
81 stars 17 forks source link

fixed specs for list_from_json_array/1 and list_to_json_array/1 #16

Closed alexturkin closed 9 years ago

alexturkin commented 9 years ago

While I was getting rid of dialyzer warnings in my code, I found out that specs from list_to/from_json_array are more strict then success typing.

Initially I thought to introduce new

-type json_term :: orddict() | binary() | integer() | float() | boolean() | 'undefined'.

and use it for both conversion functions, but in fact list_to_json_array/1 accepts wider range of values than list_from_json_array/1, so I spec'ed them separately.

alavrik commented 9 years ago

Thank you and apologies for the delay. I usually get notifications via rss and email but unfortunately both methods broke at the same time and I missed your pull request.

alexturkin commented 9 years ago

No problem! Thank you!