StructuredQueries 0.35.0 adds full JSON and JSONB support for SQLite in Swift. Key additions include a JSONBRepresentation for efficient binary storage, type-safe JSON functions (jsonExtract, jsonSet, jsonInsert, jsonAppend, jsonRemove, jsonReplace) that use Swift key paths to traverse JSON payloads, aggregate helpers like jsonGroupArray and jsonObject, and a jsonEach() method exposing SQLite's json_each table-valued function. The API provides schema-safety on both table columns and fields inside JSON payloads, and type-safety on extracted values, all without writing stringly-typed SQL.
1.2K Impressions