01 Jun, 2022

Backend

Frontend

Rails

Ruby

Serialization in Ruby on Rails

We'll discuss serialization in Ruby on Rails.

MROY Team

What is “serialization”?
https://en.wiktionary.org/wiki/serialization
From Latin noun “seriēs” — a row, a succession, a series, a sequence.
So, it’s a process of creating a sequence of some kind.

Serialization in Ruby

https://www.cosmiclearn.com/ruby/serialization.php

Serialization is the process of writing data of an object to a sequence of bytes. The inverse process of reading stream into an object is called Deserialization. This is very useful when you want to preserve state of an object, and then retrieve it later. Serialization can be done in Ruby via a class called Marshal.

https://ruby-doc.org/core-3.1.2/Marshal.html

Serialization in Rails

https://www.educative.io/answers/what-are-serializers-in-ror

Serialization converts an object in memory into a stream of bytes that can be recreated when needed. Serializers in Ruby on Rails convert a given object into a JSON format.