Skip to content

Releases: lordnull/rec2json

OTP 21 Support

15 Jan 07:11
3532c37
Compare
Choose a tag to compare

Added OTP 21 to the officially tested list of versions. Code change was updating the test suite to not rely on function application on a record.

Map Support

29 Oct 21:22
740d502
Compare
Choose a tag to compare

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

28 Jul 20:43
Compare
Choose a tag to compare
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.

16 Jul 20:41
Compare
Choose a tag to compare

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

01 Mar 05:39
Compare
Choose a tag to compare

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

23 Jul 22:27
Compare
Choose a tag to compare

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

05 Dec 22:56
Compare
Choose a tag to compare

Refactored underlying parse transform code to better preserve record defaults.

2.0.4

23 Jul 01:34
Compare
Choose a tag to compare

Fixed handling integer float values.