- Automatically mark
id
as an identifier (rendered first) - Fail on typos in attribute and association options
- Improved performance (20% to 40% faster than v1)
- Added
render_as_hash
to efficiently build a Hash from the serializer transform_keys :camelize
: a built-in setting to convert keys, in a way that does not affect runtime performancesort_keys_by :name
: allows to sort the response alphabetically, without affecting runtime performancerender
shortcut, unifyingone
andmany
attribute
as an easier approach to define serializer attributes
Since returning a Hash
is more convenient than returning a Oj::StringWriter
, and performance is comparable, default_format :hash
is now the default.
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.
- Initial Release.