{"id":20316742,"url":"https://github.com/ycsky98/json-schema-calibrator","last_synced_at":"2025-10-04T12:06:43.613Z","repository":{"id":43908850,"uuid":"511746795","full_name":"ycsky98/Json-Schema-Calibrator","owner":"ycsky98","description":"基于Java的Json描述器,解决项目当中字段多,且多个字段需要进行判定以及校验的问题","archived":false,"fork":false,"pushed_at":"2023-03-19T14:01:45.000Z","size":159,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T13:45:30.154Z","etag":null,"topics":["json","json-schema","schema"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ycsky98.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":"2022-07-08T03:16:57.000Z","updated_at":"2023-04-25T14:48:40.000Z","dependencies_parsed_at":"2024-11-14T18:40:41.184Z","dependency_job_id":null,"html_url":"https://github.com/ycsky98/Json-Schema-Calibrator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycsky98%2FJson-Schema-Calibrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycsky98%2FJson-Schema-Calibrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycsky98%2FJson-Schema-Calibrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycsky98%2FJson-Schema-Calibrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ycsky98","download_url":"https://codeload.github.com/ycsky98/Json-Schema-Calibrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248451486,"owners_count":21105880,"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":["json","json-schema","schema"],"created_at":"2024-11-14T18:27:48.799Z","updated_at":"2025-10-04T12:06:36.695Z","avatar_url":"https://github.com/ycsky98.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Json-Schema-Calibrator\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/ycsky98/Json-Schema-Calibrator/releases\"\u003e\u003cimg alt=\"Github Releases\" src=\"https://img.shields.io/github/v/release/ycsky98/Json-Schema-Calibrator?include_prereleases\u0026style=flat-square\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ycsky98/Json-Schema-Calibrator/stargazers\"\u003e\u003cimg alt=\"GitHub Stargazers\" src=\"https://img.shields.io/github/stars/ycsky98/Json-Schema-Calibrator.svg?style=flat-square\u0026label=Stars\u0026logo=github\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ycsky98/Json-Schema-Calibrator/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/ycsky98/Json-Schema-Calibrator?color=blue\u0026style=flat-square\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ycsky98/Json-Schema-Calibrator/commits\"\u003e\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/ycsky98/Json-Schema-Calibrator.svg?style=flat-square\" /\u003e\u003c/a\u003e\n\u003cbr /\u003e\n\u003c/p\u003e\n\n# 基于Java的Json描述器\n  项目采用的jdk版本为17\n\n\n### 1.组件介绍\n\n---\n    ArraySchema是一个用于数组的描述器,例如[{\"name\":\"张三\"}],\n    这样一个json数组，\n    那么使用的描述方式就是\n    JSON.array().item(\n        JSON.object()\n            .attr(\"name\", JSON.string())\n    );\n\n    来满足你对这段JSON的描述\n---\n    BooleanSchema是一个用于描述Boolean类型的描述器,\n    例如要描述一个boolean类型\n    \n    JSON.bool();\n---\n    NumberSchema是一个用于描述数字类型的描述器,例如描述一个Number类型\n\n    JSON.number();\n---\n    StringSchema是一个用于描述字符串类型的描述器,例如描述一个String类型\n\n    JSON.string();\n---\n    ObjectSchema是一个用于描述嵌套类型过多的一个描述器,例如要描述一个对象类型\n    {\"name\":\"张三\", \"age\": 18, \"isBoy\": true}\n\n    JSON.object()\n                 .attr(\"name\", JSON.string())\n                 .attr(\"age\", JSON.number())\n                 .attr(\"isBoy\", JSON.bool())\n\n- 如何进行Schema的描述校验\n- 通过Verify.verify(json, schema), 即可进行json的校验\n\u003cbr\u003e\n## New Version\n\u003cp\u003e\n\n#### 1.新增自定义异常\n\u003cp\u003e\n\n#### 2.修改了存储方式\n\n---\n    1.如何自定义异常\n        JSON.number().min(10)\n        .error(new RuntimeException(\"最小长度不能为10\"));\n- 剩余情况如上而定\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycsky98%2Fjson-schema-calibrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fycsky98%2Fjson-schema-calibrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycsky98%2Fjson-schema-calibrator/lists"}