Module: S3MPI::Converters::JSON
Instance Method Summary collapse
Instance Method Details
#generate(object, options = Hash.new) ⇒ Object
13 14 15 |
# File 'lib/s3mpi/converters/json.rb', line 13 def generate(object, = Hash.new) object.to_json() end |
#parse(json_string, options = Hash.new) ⇒ Object
8 9 10 11 |
# File 'lib/s3mpi/converters/json.rb', line 8 def parse(json_string, = Hash.new) opts = { quirks_mode: true }.merge() ::JSON.parse(json_string || 'null', **opts) end |