Class: Neo4j::Shared::TypeConverters::JSONConverter
Overview
Converts hash to/from JSON
Class Method Summary
collapse
converted?, #supports_array?
Class Method Details
.convert_type ⇒ Object
248
249
250
|
# File 'lib/neo4j/shared/type_converters.rb', line 248
def convert_type
JSON
end
|
.db_type ⇒ Object
252
253
254
|
# File 'lib/neo4j/shared/type_converters.rb', line 252
def db_type
String
end
|
.to_db(value) ⇒ Object
256
257
258
|
# File 'lib/neo4j/shared/type_converters.rb', line 256
def to_db(value)
value.to_json
end
|
.to_ruby(value) ⇒ Object
260
261
262
|
# File 'lib/neo4j/shared/type_converters.rb', line 260
def to_ruby(value)
JSON.parse(value, quirks_mode: true)
end
|