class ActiveGraph::Shared::TypeConverters::JSONConverter
Converts hash to/from JSON
Public Class Methods
convert_type()
click to toggle source
# File lib/active_graph/shared/type_converters.rb 256 def convert_type 257 JSON 258 end
converted?(_value)
click to toggle source
# File lib/active_graph/shared/type_converters.rb 252 def converted?(_value) 253 false 254 end
db_type()
click to toggle source
# File lib/active_graph/shared/type_converters.rb 260 def db_type 261 String 262 end
to_db(value)
click to toggle source
# File lib/active_graph/shared/type_converters.rb 264 def to_db(value) 265 value.to_json 266 end
to_ruby(value)
click to toggle source
# File lib/active_graph/shared/type_converters.rb 268 def to_ruby(value) 269 JSON.parse(value, quirks_mode: true) 270 end