JSONConverter

Converts hash to/from JSON

Constants

Methods

.convert_type

def convert_type
  JSON
end

.converted?

def converted?(value)
  value.is_a?(db_type)
end

.db_type

def db_type
  String
end

.to_db

def to_db(value)
  value.to_json
end

.to_ruby

def to_ruby(value)
  JSON.parse(value, quirks_mode: true)
end