class PG::TextEncoder::JSON

As soon as this class is used, it requires the ruby standard library ‘json’.
This is a encoder class for conversion of Ruby Hash, Array, String, Numeric, nil values to PostgreSQL JSON/JSONB type.

def encode(value)

def encode(value)
	::JSON.generate(value, quirks_mode: true)
end