alba

Alba is a JSON serializer for Ruby, JRuby and TruffleRuby.

MIT License

Downloads
1.2M
Stars
856
Committers
29
alba - Merry Christmas! 2023 Latest Release

Published by okuramasafumi 10 months ago

Happy holidays! We celebrate this Christmas with this bugfix release.

Most of the bug reports are responded and fixed within a week. We still maintain Alba so it's getting even better. Hope you all have a good new year!

alba - Version 3, with a little bugfix!

Published by okuramasafumi about 1 year ago

IMPORTANT NOTICE

This version contains an important bug fix. It's highly recommended to upgrade to this version if you can. If not, use version 2.4.2 instead.

Changes

So, a new major version of Alba! Since this is a major version upgrade, there are some backward incompatible changes.

  • Alba now prefers methods on a resource class over on a target object. This was possible with a option in version 2, but now it's a default behavior.
    • You might notice that this release is version 3.0.1, not 3.0.0. Yes, there was a bug about this behavior but I believe it's fixed now.
  • Alba now requires Ruby 3. Do you know that Ruby 2 is already EOL? But don't worry, you can still use version 2 of Alba!

And of course we have some shiny new features. Custom types is especially interesting. This feature lets us validate and convert certain attributes, making serialization more readable, maintainable and DRY.
To know more about types, see this section in README and related test files (this and this)

alba - Important bug fix

Published by okuramasafumi about 1 year ago

This is a special release including important bug fix that can cause data corruption. This is a safe upgrade for all v2 users, so if you cannot upgrade to version 3.0.1, make sure to use this version at least.
For Ruby 3 users, version 3.0.1 is recommended. However, it has some backward incompatible changes including dropping support of Ruby 2. So this release is for those who don't want to upgrade to version 3 or who use Ruby 2.
This is the final release of the version 2 of Alba that support Ruby 2. Ruby 2 reached EOL so I highly recommend to upgrade both Ruby and Alba to version 3!

alba - People Driven Edition

Published by okuramasafumi about 1 year ago

Welcome to the new release of Alba! There are two new features and one bugfix.

  • helper to share behaviors with inline associations
  • prefer_resource_method! to configure Alba to use resource method first with attributes
  • Fixing resource name inference bug

This released is named as "People Driven Edition" because all these changes are something that I haven't noticed we need. Thank you @george-ayris, @danielmalaton, @datbth and @kapso to help making it better!

One important note, this might be the last release to support Ruby 2! It's already EOL so I'd like to encourage people to use Ruby 3.

alba - Full of Goodies edition

Published by okuramasafumi over 1 year ago

This release adds a few tiny but nice features so that Alba is even better.
As usual, give us any feedback you have with this release!

alba - Better Rails integration

Published by okuramasafumi over 1 year ago

This release is small but important for Rails users. Now Alba integrates with Rails without creating a custom initializer!
It's also important that from this version Alba doesn't support Ruby 2.6, which is already EOL.
This release also contains a bug fix that makes Alba even better.

alba - Select this edition

Published by okuramasafumi almost 2 years ago

Alba now has select method to filter attributes. This is useful when you want to filter nil attributes. It's a simple API and another reason to "select" Alba from all the options!

alba - Kaigi on Rails edition

Published by okuramasafumi about 2 years ago

We're having a conference called "Kaigi on Rails". It's 2 days, Japanese domestic conference. I'm the chief organizer and today it's the first day.
To celebrate this conference, I'm releasing the new major version of Alba. It includes tons of new features, and there's only one breaking change, so I'd recommend you to upgrade it when possible.

alba - Preparation for v2

Published by okuramasafumi over 2 years ago

v1.6.0 release is a final release of v1 line. It includes lots of deprecations and they'll be removed in v2.

The main addition from this release is that now we can use instance methods as attributes.
See https://github.com/okuramasafumi/alba#simple-serialization-with-root-key for an example.

For the full changelog, see https://github.com/okuramasafumi/alba/blob/main/CHANGELOG.md#160-2022-03-16

See you in version 2!

alba - Birthday release

Published by okuramasafumi almost 3 years ago

Birthday release

Today is the birthday of @okuramasafumi so here's the new version of Alba :)

Version 1.5.0 features layout. We can now apply "layout" to serialized JSON. This is useful for adding pagination, and also will be used when implementing JSON:API feature.

To see what changed in this version, check CHANGELOG.
If you want full changelog, see https://github.com/okuramasafumi/alba/compare/v1.4.0...v1.5.0

New Contributors

alba - Alba 1.3.0 for even better performance

Published by okuramasafumi over 3 years ago

Alba 1.3.0 brings 20% performance improvements on many.

alba - Version 1.2.0 to support types

Published by okuramasafumi over 3 years ago

Now you can validate input with types and even convert it to those types.