oj_serializers 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a03657fa651d7b3309e4d182dc2a8446733190cd92833ebcfd20a3bc24efeb9b
4
- data.tar.gz: fa3169a06d80fbc73324eda88866a3f549f59ccf5d75085ac988a6e571d7d8a2
3
+ metadata.gz: 281e961cd6a9da8c3723dd56ce7e1aa8ec112c57d13ab15e763ecef98eb1f659
4
+ data.tar.gz: cd9a42db1ea64aac9c75755550ce0bb3123646ac85020056a4d3bc5dae7e9251
5
5
  SHA512:
6
- metadata.gz: 3b1fe6d00cec3052d51bb4f508731a458d52b23645e936e83992f144d638d381abaa95cbb0adbb8280bf41f2f13e2fcdbe6916556a9d5ecbac8135ceffc37f00
7
- data.tar.gz: 77372418c201970662770f7ab1bbfeeca7a9260bf155ff2431cae7003dbd6dbed5d1dafaf9e149347ec452015d1656b2430089688316e41b1d837d0b5e971cfc
6
+ metadata.gz: c3816ef19190cf4dbddfa942d205b21cb0d639ed33cf9ff34a9972038179d677cfabe659fc36f1780e6fb64fb8c7145a756012bfc1a8de3bc4cb0256e419917a
7
+ data.tar.gz: 364da01e189d7c00b4abcbaa490c2e8a0432acf9f126a0db67ccab3d1a2c7a1b1724267ec084980ba706ad43fb89c1964749a4684736d72888f6ddb5fe970f3f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [Oj Serializers 2.0.0 (2023-03-27)](https://github.com/ElMassimo/oj_serializers/pull/9)
2
+
3
+ ### Features ✨
4
+
5
+ - Improved performance (20% to 40% faster than v1)
6
+ - Added `render_as_hash` to efficiently build a Hash from the serializer
7
+ - `transform_keys :camelize`: a built-in setting to convert keys, in a way that does not affect runtime performance
8
+ - `sort_keys_by :name`: allows to sort the response alphabetically, without affecting runtime performance
9
+ - `render` shortcut, unifying `one` and `many`
10
+ - `attribute` as an easier approach to define serializer attributes
11
+
12
+ ### Breaking Changes
13
+
14
+ Since returning a `Hash` is more convenient than returning a `Oj::StringWriter`, and performance is comparable, `default_format :hash` is now the default.
15
+
16
+ The previous APIs will still be available as `one_as_json` and `many_as_json`, as well as `default_format :json` to make the library work like in version 1.
17
+
1
18
  ## Oj Serializers 1.0.2 (2023-03-01) ##
2
19
 
3
20
  * [fix: avoid freezing `ALLOWED_INSTANCE_VARIABLES`](https://github.com/ElMassimo/oj_serializers/commit/ade0302)