---
title: "Type-safe JSON and JSONB in StructuredQueries"
url: https://daily.dev/posts/type-safe-json-and-jsonb-in-structuredqueries-zi6sdwzpy
source_url: https://www.pointfree.co/blog/posts/220-type-safe-json-and-jsonb-in-structuredqueries
type: article
source: "Point-Free Pointers"
published: 2026-08-03T18:47:07.407Z
updated: 2026-08-03T18:47:29.368Z
tags: ["swift", "sqlite"]
reading_time: 5
upvotes: 2
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Type-safe JSON and JSONB in StructuredQueries

**[Point-Free Pointers](https://daily.dev/sources/pointfree)** · 5 min read · 2 upvotes · 0 comments

## Summary

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.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.pointfree.co/blog/posts/220-type-safe-json-and-jsonb-in-structuredqueries>

## Similar posts on daily.dev

- [SQLite JSON Superpower: Virtual Columns \+ Indexing](https://daily.dev/posts/sqlite-json-superpower-virtual-columns-indexing-awwu21k4f) · Hacker News · 1 upvotes · 0 comments
- [SQL needed structure](https://daily.dev/posts/sql-needed-structure-gabmjg1fv) · Jamie Brandon · 1 upvotes · 0 comments
- [What’s new in SQLiteData: Views](https://daily.dev/posts/what-s-new-in-sqlitedata-views-w2tizgkcy) · Point-Free Pointers · 1 upvotes · 0 comments
- [What's New in pg\_clickhouse - JSONB Support, SQL value functions, Streaming, and more](https://daily.dev/posts/what-s-new-in-pg-clickhouse---jsonb-support-sql-value-functions-streaming-and-more-go94bydw3) · ClickHouse · 31 upvotes · 1 comments

---

Tags: [#swift](https://daily.dev/tags/swift), [#sqlite](https://daily.dev/tags/sqlite)

[View this post on daily.dev](https://daily.dev/posts/type-safe-json-and-jsonb-in-structuredqueries-zi6sdwzpy)
