Sqljson
PostgreSQL-compatible SQL-standard SQL/JSON in Go
Install / Use
/learn @theory/SqljsonREADME
Go SQL/JSON
The SQL/JSON package provides PostgreSQL-compatible SQL-standard SQL/JSON functionality in Go. For now that means jsonpath. An example:
func main() {
src := []byte(`{
"track": {
"segments": [
{
"location": [ 47.763, 13.4034 ],
"start time": "2018-10-14 10:05:14",
"HR": 73
},
{
"location": [ 47.706, 13.2635 ],
"start time": "2018-10-14 10:39:21",
"HR": 135
}
]
}
}`)
// Parse the JSON.
var value any
if err := json.Unmarshal(src, &value); err != nil {
log.Fatal(err)
}
// Parse the SQL-standard jsonpath query.
p, err := path.Parse(`$.track.segments[*] ? (@.HR > 130)."start time"`)
if err != nil {
log.Fatal(err)
}
// Execute the query against the JSON.
items, err := p.Query(context.Background(), value)
if err != nil {
log.Fatal(err)
}
// Print the results.
fmt.Printf("%v\n", items)
// Output: [2018-10-14 10:39:21]
}
See the path README for a complete description of the SQL/JSON path language, and the Go doc for usage and examples.
Or take the 🛝 Playground for a spin (direct link for above example). Implemented as a single-page stateless JavaScript and TinyGo-compiled Wasm app.
Copyright
Copyright © 1996-2025 The PostgreSQL Global Development Group
Copyright © 2024-2025 David E. Wheeler
Related Skills
oracle
343.3kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
prose
343.3kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
Command Development
92.1kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
Plugin Structure
92.1kThis skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "use ${CLAUDE_PLUGIN_ROOT}", "add commands/agents/skills/hooks", "configure auto-discovery", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.
