Using PostgreSQL and jsonb with Ruby on Rails
Postgres 9.4 introduces a new column type: jsonb
. json
and jsonb
columns store data differently, so just compare the two when you want to store JSON data and choose the one that matches your use case best.
Rails 4.2 includes support for jsonb
columns, too. The article outlines different ways on how to interact with the serialized object.