Releases: lordnull/rec2json
OTP 21 Support
Map Support
The release has a huge breaking change: rather than use proplists to represent Json, it uses maps.
- All to_json functions generate maps.
- All from_json functions expect maps.
- All mutator functions should expect the Json as a map.
- Adding properties to a json can be done using a map as well as a 2-tuple.
- Removed support for deprecated and broken "scan_string" and "scan_file". Rec2json only uses the parse transform style now.
rebar re-support
Fix Rebar Support (#27) With this, projects using rebar should be able to use rec2json again (e.g., resolves #26 ).
Move to erlang.mk and adding user type for record.
This moves the build system to use erlang.mk rather than rebar. Also, added the ability to export a user type module_name:record_name()
with a customizable type name.
Addition of atom conversion via r2j_type:unsafe_atom/0
As far as this project is concerned, adding a type conversion bundled with the library is enough to bump the 'feature' part of semvar.
The type atom() is not supported because a primary use case for rec2json is to convert untrusted data, such as an http post request. Converting untrusted data into atoms can exhaust the erlang vm's atom table, or worse exhaust the machine's memory. Rec2json is, by default, safe.
It is still possilbe to apply a type to a record field so that json strings will be converted to the equivalent atom using either a user defined type, or the new provied r2j_type:unsafe_atom() type.
Version 3.0
Removes support for erlang versions below 17. Adds proper "support" for user defined types; proper in this case means "still ignored". Also adds fixed found by dialyzer.
Version 2.1
Refactored underlying parse transform code to better preserve record defaults.