{"id":17722485,"url":"https://github.com/leixingyu/jsoneditor","last_synced_at":"2025-03-14T05:31:52.140Z","repository":{"id":41460510,"uuid":"437338457","full_name":"leixingyu/jsonEditor","owner":"leixingyu","description":"Json Editor in Python","archived":false,"fork":false,"pushed_at":"2023-01-12T15:45:05.000Z","size":26,"stargazers_count":11,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-09T23:47:03.109Z","etag":null,"topics":["json","json-editor","json-viewer","mvc","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/leixingyu.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}},"created_at":"2021-12-11T16:54:25.000Z","updated_at":"2022-10-22T18:40:49.000Z","dependencies_parsed_at":"2023-02-09T12:31:53.773Z","dependency_job_id":null,"html_url":"https://github.com/leixingyu/jsonEditor","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leixingyu%2FjsonEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leixingyu%2FjsonEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leixingyu%2FjsonEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leixingyu%2FjsonEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leixingyu","download_url":"https://codeload.github.com/leixingyu/jsonEditor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532517,"owners_count":20306151,"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-editor","json-viewer","mvc","python"],"created_at":"2024-10-25T15:38:28.337Z","updated_at":"2025-03-14T05:31:51.823Z","avatar_url":"https://github.com/leixingyu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003eJson Editor\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    A python script for editing `.json` file based on Qt framework\n    \u003cbr /\u003e\n    \u003ca href=\"https://youtu.be/bTjKKb8CYIM\"\u003eDemo\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## About The Project\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/7O7OGlr.jpg\" alt=\"json-editor\" width=\"70%\"/\u003e\n\u003c/div\u003e\n\n`.json` files are heavily dependent in production environment and there are\nmany benefits of creating a standalone editor instead of editing the text file directly. \nNot everyone is fan of working with a text editor (like artists) and no one\ncan be confident to avoid syntax error in their edits.\nMoreover, a standalone tool supports features like version control,\nvalidation, schema and more.\n\nThe goal of this tool initially serves as my [model view programming practice in PyQt](https://github.com/leixingyu/model-view-tutorial),\nbut then I thought, why not iterate on it and make it user-friendly, portable and minimal? My goal now is to make this\nmodular and easily embeddable, so to create a standardized way for displaying and editing `.json` file across applications.\n\n## Getting Started\n\n### Prerequisites\n\n- [Qt](https://github.com/mottosso/Qt.py): a module that supports different\npython qt bindings\n\n   or alternatively, change the code below to whatever qt binding you have on your machine.\n   ```python\n   from Qt import QtWidgets, QtCore, QtGui\n   from Qt import _loadUi\n   ```\n\n### Launch\n\n1. Unzip the **json-editor** package and rename is to something like `jsonViewer`\n\n2. You can either run `main.py` directly or:\n    ```python\n    from jsonViewer import main\n    main.show()\n    ```\n\n## Features\n\n### Validation, sort and filtering\n\n- Data validation is a built-in feature that comes with the model/view architecture\nas type is preserved during `setData()` and `data()` methods. It then gets translated\ninto qt element: `str` as `QLineEdit`; `int` as `QSpinBox`; `float` as `QDoubleSpinBox`\n\n- `list` and `dict` type data fully utilized the hierarchical support of `QAbstractItemModel`.\n\n- Sorting and Filtering are enabled with the help of `QSortFilterProxyModel`.\n\n![](https://i.imgur.com/ngslOnZ.gif)  \n\n\n### Serialization\n\nSerialization and de-serialization in the `QJsonModel` enables functionalities like copy/paste (left) \nand drag/drop (right).\n\n| Copy and Paste | Drag and Drop |\n|-----|----|\n| ![copy/paste](https://i.imgur.com/UVlgHmQ.gif) | ![drag/drop](https://i.imgur.com/1uHIhOA.gif) |\n\n### Raw View\n\nThe tool also has a built-in text editor with syntax highlighting known as the **raw view**.\n\nAs shown, the data between the **tree view** and the **raw view** are interchangeable.\n\n![](https://i.imgur.com/o8IH5q9.gif)\n\n\n## Roadmap\n\n- [x] Json text view with syntax highlight\n- [ ] Json schema support\n- [ ] File drop\n- [ ] Custom stylesheet\n- [ ] Scripting interface for modular support\n- [ ] Web deployment (maybe?)\n\n### Reference\n\n[Model View Programming](https://github.com/leixingyu/model-view-tutorial)\n\n[QJsonModel](https://github.com/dridk/QJsonModel)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleixingyu%2Fjsoneditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleixingyu%2Fjsoneditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleixingyu%2Fjsoneditor/lists"}