Class: DB::Postgres::Native::Types::JSON
- Inherits:
-
Object
- Object
- DB::Postgres::Native::Types::JSON
- Defined in:
- lib/db/postgres/native/types.rb
Overview
A JSON type converter.
Instance Method Summary collapse
-
#name ⇒ Object
Get the SQL type name for JSON.
-
#parse(string) ⇒ Object
Parse a JSON value from the database.
Instance Method Details
#name ⇒ Object
Get the SQL type name for JSON.
176 177 178 |
# File 'lib/db/postgres/native/types.rb', line 176 def name "JSON" end |
#parse(string) ⇒ Object
Parse a JSON value from the database.
183 184 185 |
# File 'lib/db/postgres/native/types.rb', line 183 def parse(string) ::JSON.parse(string, symbolize_names: true) if string end |