Module: S3MPI::Format

Included in:
Interface
Defined in:
lib/s3mpi/format.rb

Instance Method Summary collapse

Instance Method Details

#parse_json_allowing_quirks_mode(obj) ⇒ Object



6
7
8
9
10
# File 'lib/s3mpi/format.rb', line 6

def parse_json_allowing_quirks_mode obj
  JSON.parse(obj || 'null')
rescue JSON::ParserError => e
  JSON.parse(obj || 'null', quirks_mode: true)
end