{"id":34754513,"url":"https://github.com/cjinhuo/thrift-to-json-schema","last_synced_at":"2026-05-06T00:02:14.797Z","repository":{"id":62868471,"uuid":"561694494","full_name":"cjinhuo/thrift-to-json-schema","owner":"cjinhuo","description":"Parse Thrift to JSON Schema","archived":false,"fork":false,"pushed_at":"2025-04-17T09:49:52.000Z","size":1024,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T23:52:12.473Z","etag":null,"topics":["json","json-schema","thrift"],"latest_commit_sha":null,"homepage":"https://cjinhuo.github.io/thrift-to-json-schema/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cjinhuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":".github/CODE_OF_CONDUCT.md","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}},"created_at":"2022-11-04T09:22:42.000Z","updated_at":"2025-04-17T09:49:56.000Z","dependencies_parsed_at":"2025-04-17T10:25:49.369Z","dependency_job_id":"f1628d08-2235-4451-a8a9-5759afd237df","html_url":"https://github.com/cjinhuo/thrift-to-json-schema","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cjinhuo/thrift-to-json-schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjinhuo%2Fthrift-to-json-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjinhuo%2Fthrift-to-json-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjinhuo%2Fthrift-to-json-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjinhuo%2Fthrift-to-json-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjinhuo","download_url":"https://codeload.github.com/cjinhuo/thrift-to-json-schema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjinhuo%2Fthrift-to-json-schema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32672682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["json","json-schema","thrift"],"created_at":"2025-12-25T05:29:36.178Z","updated_at":"2026-05-06T00:02:14.785Z","avatar_url":"https://github.com/cjinhuo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# overview\nparse Thrift to JSON schema with typescript\n\n# demo\n![demo](./assets/parse.jpeg)\n[Online Demo](https://cjinhuo.github.io/thrift-to-json-schema/)\n\n# install\n`pnpm add @trasm/thrift-jsma`\n\n# usage\n```js\nimport { parseThriftToJsonSchema,parseThriftToTypeBox } from '@trasm/thrift-jsma'\n  const structString = `\n    # @flag header\n    struct EmptyStruct {\n    string field_string\n    # @schema maxLength:66\n    double field_double\n    i32 field_i32\n    i64 field_i64\n    bool field_bool\n    optional string field_optional_string\n    }\n  `\n  const jsonSchema = parseThriftToJsonSchema(structString)\n  const jsonTypeBox = parseThriftToTypeBox(structString)\n```\n\n## syntax\n### flag\n@flag header: means current struct is root node.\n### scheme\n@schema xxx: means add additional constraint for field, such as add '@schema maxLength:66' for string type\n\n# references\n* parse thrift to AST:https://github.com/creditkarma/thrift-parser\n* built JSON schema with typescript:https://github.com/sinclairzx81/typebox\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjinhuo%2Fthrift-to-json-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjinhuo%2Fthrift-to-json-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjinhuo%2Fthrift-to-json-schema/lists"}