{"id":26807765,"url":"https://github.com/lovasoa/jsonjoy-builder","last_synced_at":"2025-10-29T13:02:08.926Z","repository":{"id":285152088,"uuid":"956015830","full_name":"lovasoa/jsonjoy-builder","owner":"lovasoa","description":"Visual JSON Schema editor for creating and manipulating JSON Schema definitions with an intuitive interface.","archived":false,"fork":false,"pushed_at":"2025-03-29T21:27:56.000Z","size":719,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T21:28:52.708Z","etag":null,"topics":["api","json","jsonschema","jsonschema-generator","jsonschema-validator","openapi","ui"],"latest_commit_sha":null,"homepage":"https://json.ophir.dev","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/lovasoa.png","metadata":{"files":{"readme":"README-features.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-03-27T15:04:46.000Z","updated_at":"2025-03-29T21:28:00.000Z","dependencies_parsed_at":"2025-03-29T21:29:02.899Z","dependency_job_id":"a2f1e491-7016-4f92-821b-c4439bbd5661","html_url":"https://github.com/lovasoa/jsonjoy-builder","commit_stats":null,"previous_names":["lovasoa/jsonjoy-builder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasoa%2Fjsonjoy-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasoa%2Fjsonjoy-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasoa%2Fjsonjoy-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovasoa%2Fjsonjoy-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovasoa","download_url":"https://codeload.github.com/lovasoa/jsonjoy-builder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246258865,"owners_count":20748573,"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":["api","json","jsonschema","jsonschema-generator","jsonschema-validator","openapi","ui"],"created_at":"2025-03-30T00:17:00.708Z","updated_at":"2025-10-29T13:02:08.832Z","avatar_url":"https://github.com/lovasoa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON Schema Features\n\nThis project includes two key features for working with JSON Schemas:\n\n1. **JSON Schema Inference**: Automatically generates a JSON Schema from a JSON document\n2. **JSON Validation**: Validates JSON documents against the current schema\n\n## Implementation Details\n\n### JSON Schema Inference\n\nThe schema inference feature is implemented using a custom algorithm that analyzes JSON data and generates an appropriate schema. It's designed to:\n\n- Detect data types (string, number, boolean, object, array)\n- Identify common string formats (date, date-time, email, uuid, uri)\n- Handle nested objects and arrays\n- Support mixed-type arrays using `oneOf`\n- Mark all non-null properties as required\n\nThe implementation is based on approaches used in libraries like:\n- [json-schema-generator](https://github.com/krg7880/json-schema-generator)\n- [GenSON](https://github.com/wolverdude/GenSON)\n\n### JSON Validation\n\nThe validation feature uses [Ajv](https://ajv.js.org/) (Another JSON Schema Validator), which is one of the fastest and most complete JSON Schema validators. \n\nKey features:\n- Complete support for JSON Schema draft-07\n- Format validation with ajv-formats\n- Detailed error reporting\n- High performance validation\n\n## UI Features\n\nBoth components leverage the Monaco Editor (the same editor used in Visual Studio Code) for an enhanced user experience:\n\n- Syntax highlighting for JSON\n- JSON formatting\n- Validation-as-you-type\n- Bracket matching and auto-closing\n- Line numbers and folding\n\nThe JSON Validator component also displays the current schema alongside the input JSON document, making it easier to understand the validation requirements.\n\n## Project Structure\n\nThe features are organized as follows:\n\n```\nsrc/\n  components/\n    features/\n      SchemaInferencer.tsx    # Component for inferring schemas from JSON\n      JsonValidator.tsx       # Component for validating JSON against schema\n  lib/\n    schema-inference.ts       # Core schema inference logic as a service\n  pages/\n    Index.tsx                 # Main page with both features integrated\n```\n\n## Dependencies\n\n- `monaco-editor`: Advanced code editor used in VS Code\n- `ajv`: JSON Schema validator\n- `ajv-formats`: Format validation for ajv\n\n## Usage\n\n1. **Schema Inference**:\n   - Click \"Infer from JSON\" button\n   - Paste or type a JSON document in the editor\n   - Click \"Generate Schema\"\n\n2. **JSON Validation**:\n   - Click \"Validate JSON\" button\n   - Paste or type a JSON document in the left editor\n   - Review the current schema in the right editor\n   - Click \"Validate\" to check against the current schema\n\n## References\n\n- [JSON Schema website](https://json-schema.org/)\n- [Ajv Documentation](https://ajv.js.org/)\n- [Monaco Editor](https://microsoft.github.io/monaco-editor/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovasoa%2Fjsonjoy-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovasoa%2Fjsonjoy-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovasoa%2Fjsonjoy-builder/lists"}