{"id":34521344,"url":"https://github.com/speakeasy-api/jq","last_synced_at":"2026-06-01T05:31:57.694Z","repository":{"id":322584531,"uuid":"1071827809","full_name":"speakeasy-api/jq","owner":"speakeasy-api","description":null,"archived":false,"fork":false,"pushed_at":"2025-11-13T20:47:30.000Z","size":27986,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T05:34:25.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jq.speakeasy.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-10-07T21:41:37.000Z","updated_at":"2025-11-13T20:47:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/speakeasy-api/jq","commit_stats":null,"previous_names":["speakeasy-api/jq"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/speakeasy-api/jq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fjq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fjq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fjq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fjq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-api","download_url":"https://codeload.github.com/speakeasy-api/jq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fjq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33762215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T04:57:50.480Z","updated_at":"2026-06-01T05:31:57.688Z","avatar_url":"https://github.com/speakeasy-api.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jq — Symbolic Execution for jq\n\nRun jq on schemas, not just data. Infer the output JSON Schema from an input schema and a jq expression. Built on gojq. Used in production to keep transformations type-safe.\n\n## Install\n\n```sh\ngo get github.com/speakeasy-api/jq\n```\n\n## Playground\n\nRun `make build-wasm \u0026\u0026 cd web \u0026\u0026 npm install \u0026\u0026 npm run dev`, then visit http://localhost:5174/. Execute: run jq on JSON data. Symbolic: transform OpenAPI schemas with `x-speakeasy-transform-from-api: 'jq {id, total: (.price * .qty)}'`.\n\n## Quick example (symbolic)\n\n```go\nimport (\n  \"context\"\n  \"github.com/speakeasy-api/jq\"\n  \"github.com/speakeasy-api/jq/schemaexec\"\n)\n\ninput := schemaexec.BuildObject(map[string]*oas3.Schema{\n  \"items\": schemaexec.ArrayType(schemaexec.ObjectType()),\n}, []string{\"items\"})\nq, _ := jq.Parse(\".items[] | {name: .product}\")\nout, _ := schemaexec.RunSchema(context.Background(), q, input)\n// out.Schema is the inferred output schema\n```\n\n## Quick example (data)\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"log\"\n  \"github.com/speakeasy-api/jq\"\n)\n\nfunc main() {\n  q, err := jq.Parse(`.foo | ..`)\n  if err != nil { log.Fatalln(err) }\n  input := map[string]any{\"foo\": []any{1, 2, 3}}\n  iter := q.Run(input)\n  for {\n    v, ok := iter.Next(); if !ok { break }\n    if err, ok := v.(error); ok { log.Fatalln(err) }\n    fmt.Printf(\"%#v\\n\", v)\n  }\n}\n```\n\n## Symbolic Execution Capabilities\n\n- Schema inference for common jq constructs: property access (`.foo`, `.foo.bar`), arrays (`.[0]`, `.[]`), object construction (`{name: .x}`), type narrowing and constraints\n- Conditionals: `if .score \u003e= 90 then \"gold\" else \"silver\"` → `enum: [\"gold\", \"silver\"]`\n- Object merging: reconcile compatible branches into unions\n- OpenAPI aware: designed for `x-speakeasy-transform-from-api` workflows\n\n## Why this exists\n\nUse jq to describe JSON transformations while preserving type information. Infers output schemas to keep downstream codegen and tooling type-safe. Powers Speakeasy's SDK generation.\n\n## Built on gojq\n\nFork of [itchyny/gojq](https://github.com/itchyny/gojq) (pure Go jq). Adds bytecode introspection (`GetCodes`) for symbolic execution. No C dependencies. YAML support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fjq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-api%2Fjq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fjq/lists"}