Panko Serializer Versions Save

High Performance JSON Serialization for ActiveRecord & Ruby Objects

v0.6.0

4 years ago

Changes

v0.5.10

5 years ago

Changes

  • Support ruby 2.3.7 [issue #39]
  • Internal code cleanup
  • CI: test against ruby 2.3.8, 2.5.5 and 2.6.3 with rails 4.2, 5.2 and 6.0.0beta3

v0.5.9

5 years ago

Changes

  • Updating gemspec to include links to various links - source code uri, issues, documentation, release notes, etc.

v0.5.8

5 years ago

Changes

  • Bug fix for Rails 4.2 and dirty attributes - Thanks @palkan - Pull Request
  • Code cleanups using Rubocop, Clang-Formatter and C compiler warnings.

v0.5.7

5 years ago

Changes

  • Support Oj 3.7.* instead of 3.6.*

v0.5.6

5 years ago

Changes

this version includes changes from 0.5.3 to 0.5.6 - the versions between had small code cleanup.

  • Update microbenchmarks to latest versions of Ruby, Rails, AMS and Panko
  • Fix hash support in Panko::Response report in #32
  • Exposing milliseconds in ISO8601 date strings

v0.5.3

5 years ago

Changes

this version includes changes from 0.5.0 to 0.5.3

  • Serialize json dates correctly - Until 0.5.3 we serialized dates as ISO8601 with milliseconds since this version we will serialize milliseconds as well. example: we serialized 2017-03-04T12:45:23Z instead of 2017-03-04T12:45:23.000Z
  • Handling concurrent use of the same serializer - Panko re-uses serializers for has-one/has-many associations between runs - which can cause a bug in concurrent serialization
  • Deeply nesting context and scope - passing MySerializer.new(user, scope: current_user) will pass the scope to all nested associations. (same as context)
  • Code cleanups

v0.4.4

5 years ago

Changes

  • Rubocop fixes to all code
  • Panko::Response enchantments - handling array and nice "DSL"

Panko::Response.create

Panko::Response is a nice utility, but building nested objects with JSON values can be really ugly and fast.

Let's take this example (from specs):

Panko::Response.new([
  data: Panko::Response.new(
    json_data: Panko::JsonValue.from({ a: 1 }.to_json),
    foos: Panko::ArraySerializer.new(Foo.all, each_serializer: FooSerializer),
    foo: Panko::JsonValue.from(FooSerializer.new.serialize_to_json(Foo.first)),
  )
])

Will be changed to:

Panko::Response.create do |t|
  [
    {
      data: t.value(
        json_data: t.json({ a: 1 }.to_json),
        foos: t.array_serializer(Foo.all, FooSerializer),
        foo: t.serializer(Foo.first, FooSerializer)
      )
    }
  ]
end

v0.4.3

5 years ago

Changes

v0.4.2

6 years ago

Changes