Sha256: 45d5dacdeb0566e774da73d0bef643387fbabfead3682f9dfb5a8f97f9b19428
Contents?: true
Size: 430 Bytes
Versions: 13
Compression:
Stored size: 430 Bytes
Contents
# -*- ruby -*- # frozen_string_literal: true require 'json' module PG module TextEncoder # This is a encoder class for conversion of Ruby Hash, Array, String, Numeric, nil values to PostgreSQL JSON/JSONB type. # # As soon as this class is used, it requires the ruby standard library 'json'. class JSON < SimpleEncoder def encode(value) ::JSON.generate(value, quirks_mode: true) end end end end # module PG
Version data entries
13 entries across 13 versions & 1 rubygems