module

Granite::Converters::Json(M, T)

Converts an Object of type M to/from a database column of type T.

Valid types for T include: String, JSON::Any, and Bytes.

NOTE: M must implement #to_json and .from_json methods.

Instance methods

from_rs(result : DB::ResultSet) : M | Nil
Source
to_db(value : M | Nil) : Granite::Columns::Type
Source