Expand description
Model serialization helpers: as_json with only/except filtering (Rails
as_json(only:/except:)) and serialized columns (store a struct as JSON text).
Functionsยง
- as_json
- Serialize a value to a JSON
Value(null on failure). - as_
json_ except - Serialize dropping the listed top-level keys (Rails
as_json(except:)). - as_
json_ only - Serialize keeping only the listed top-level keys (Rails
as_json(only:)). - deserialize_
column - Deserialize a value previously stored by
serialize_column. - serialize_
column - Serialize a value to a JSON string for storage in a text/JSON column.