There's a lot of open issues
A long-lived project that still receives updates
High Performance JSON Serialization for ActiveRecord & Ruby Objects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

> 3.11.0, < 4.0.0
 Project Readme

Panko

Build Status

Panko is a library which is inspired by ActiveModelSerializers 0.9 for serializing ActiveRecord/Ruby objects to JSON strings, fast.

To achieve its performance:

  • Oj - Panko relies on Oj since it's fast and allows for incremental serialization using Oj::StringWriter
  • Serialization Descriptor - Panko computes most of the metadata ahead of time, to save time later in serialization.
  • Type casting — Panko does type casting by itself, instead of relying on ActiveRecord.

To dig deeper about the performance choices, read Design Choices.

Support

License

The gem is available as open source under the terms of the MIT License.