Class: PG::TextDecoder::JSON

Inherits:
SimpleDecoder show all
Defined in:
lib/pg/text_decoder.rb

Instance Attribute Summary

Attributes inherited from Coder

#name

Instance Method Summary collapse

Methods inherited from Coder

#==, #dup, #encode, #format, #format=, #initialize, #inspect, #marshal_dump, #marshal_load, #oid, #oid=, #to_h

Constructor Details

This class inherits a constructor from PG::Coder

Instance Method Details

#decode(string, tuple = nil, field = nil) ⇒ Object



45
46
47
# File 'lib/pg/text_decoder.rb', line 45

def decode(string, tuple=nil, field=nil)
	::JSON.parse(string, quirks_mode: true)
end