Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Releases: jonasrichard/ejson

Upgrade dependencies

20 Feb 20:27
Compare
Choose a tag to compare

Upgraded dependencies, basically jsx only to 2.9.0. Auto tests now runs on >= Erlang 20.3.

Bug fixed

30 Sep 12:27
Compare
Choose a tag to compare

Thanks to the contributors a few hard-to-catch bugs are fixed in this release.

  • Skip undefined values rather then convert them to null if undefined is default (Dmitry Belyaev)
  • application id is a string instead of an atom (João Henrique Ferreira de Freitas)

Better type support

03 Aug 15:46
Compare
Choose a tag to compare
  • __rec field is generated when it is needed (untyped list, untyped record)
  • from_json function needs target type (!)

Make API more generic

01 Aug 09:07
Compare
Choose a tag to compare

In this release the rules are reworked again, so there are couple of incompatible changes.

  • Only typed fields are supported (number, boolean and record added)
  • Pre- and post-process callbacks are extended to any types.
  • With generic type we can convert directly from/to jsx terms (by-passing ejson conversion engine)

Rethinking API, reimplementing rules

07 Jul 15:42
Compare
Choose a tag to compare

In the first release problems came up, so there was a good chance to capture the requirements. At the same time I thought it was safe to implement the encoding/decoding rules by property-based testing driven development. It is a fun, and it covered many errors I didn't think about.
I also reworked the conversion rules, to get rid of extra tuples, and make place for conversion option as well.

Option for raw field conversion

19 Feb 13:43
Compare
Choose a tag to compare

In this release there is a field_fun_json_term conversion rule which is very similar to the field_fun, but after applying the fun to the field this new rule doesn't call json conversion on the result.

Postprocess generated json term

07 Jan 13:54
Compare
Choose a tag to compare

With ejson:to_json_term/2 or to_json_term_module/2 one can get not the final JSON string but a term which is in the format JSX library uses. With that call you can post-process the JSX term before converting it to binary.

Field and record preprocessing

31 Jan 16:25
Compare
Choose a tag to compare
  • {rec_fun, Name, {Module, Function}} creates a calculated field from the whole record value
  • {field_fun, Name, {Module, Function}} calculates a field from the current field value
  • {const, Name, Value} creates constant field

Preprocessing and transient fields

27 Jan 16:02
Compare
Choose a tag to compare

Field preprocessing and transient fields are implemented.

0.1.1

14 Jan 10:11
Compare
Choose a tag to compare
Extracting module attributes