{"id":13784047,"url":"https://github.com/gavinwahl/postgres-json-schema","last_synced_at":"2025-04-03T14:42:01.576Z","repository":{"id":43088489,"uuid":"70303257","full_name":"gavinwahl/postgres-json-schema","owner":"gavinwahl","description":"JSON Schema validation for PostgreSQL","archived":false,"fork":false,"pushed_at":"2024-03-20T07:09:04.000Z","size":12,"stargazers_count":488,"open_issues_count":8,"forks_count":35,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-10-29T07:02:49.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"postgresql","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavinwahl.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}},"created_at":"2016-10-08T04:15:34.000Z","updated_at":"2024-10-21T00:50:51.000Z","dependencies_parsed_at":"2024-01-07T00:43:52.006Z","dependency_job_id":"db53d6c7-a1bf-4633-857f-4b73eeb6c26c","html_url":"https://github.com/gavinwahl/postgres-json-schema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinwahl%2Fpostgres-json-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinwahl%2Fpostgres-json-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinwahl%2Fpostgres-json-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinwahl%2Fpostgres-json-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinwahl","download_url":"https://codeload.github.com/gavinwahl/postgres-json-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247023159,"owners_count":20870928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-08-03T19:00:34.808Z","updated_at":"2025-04-03T14:42:01.548Z","avatar_url":"https://github.com/gavinwahl.png","language":"PLpgSQL","funding_links":[],"categories":["Who Uses the Test Suite","PLpgSQL"],"sub_categories":["PostgreSQL"],"readme":"# postgres-json-schema\n\n[![Build Status](https://travis-ci.org/gavinwahl/postgres-json-schema.svg?branch=master)](https://travis-ci.org/gavinwahl/postgres-json-schema)\n\npostgres-json-schema allows validation of [JSON\nschemas](http://json-schema.org/) in PostgreSQL. It is implemented as a\nPL/pgSQL function and you can use it as a check constraint to validate the\nformat of your JSON columns.\n\npostgres-json-schema supports the entire JSON schema draft v4 spec, except for\nremote (http) references. It's tested against the official\n[JSON-Schema-Test-Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite).\n\n# Installation\n\npostgres-json-schema is packaged as an PGXS extension. To install, just run\n`make install` as root, then `CREATE EXTENSION \"postgres-json-schema\";` as the\ndatabase superuser.\n\n# Example\n\n    CREATE TABLE example (id serial PRIMARY KEY, data jsonb);\n    ALTER TABLE example ADD CONSTRAINT data_is_valid CHECK (validate_json_schema('{\"type\": \"object\"}', data));\n\n    INSERT INTO example (data) VALUES ('{}');\n    -- INSERT 0 1\n\n    INSERT INTO example (data) VALUES ('1');\n    -- ERROR:  new row for relation \"example\" violates check constraint \"data_is_valid\"\n    -- DETAIL:  Failing row contains (2, 1).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinwahl%2Fpostgres-json-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinwahl%2Fpostgres-json-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinwahl%2Fpostgres-json-schema/lists"}