This repository contains a small graphical application for editing the JSON files contained in this directory. Each JSON file represents one "table" with the following shape:
{
"table": "table_name",
"rows": [
{ "column": "value", ... },
...
]
}The program loads all *.json files in the working directory and allows you to edit the data similar to a simple database. You can add or remove tables (files), columns and rows and edit existing entries. The value types of each column are validated so that integer fields only accept integers, floating point fields only accept floats, etc. Boolean columns use checkboxes. When adding new columns you can choose the data type from a drop-down menu and optionally provide a default value. ID columns must be unique and the application warns about duplicates. Column types are determined from all rows so integer and boolean values stay in their original types when edited.
The user interface is built with PyQt6, giving the application a modern look and feel while still being easy to package as a single executable.
Install the dependency and run the application with Python:
pip install PyQt6
python json_gui.pyAll JSON files in the current directory will be loaded. Use the buttons to add or remove tables, columns and rows. A search box allows filtering rows and a drop-down lets you choose which column to search. Press Enter or the Search button to execute the search. Typing none in the search box will show rows where the selected column has no value. Table columns can be sorted by clicking the headers after enabling the "Enable Sorting" checkbox. An arrow indicates which column is sorted and in which direction. Columns containing null / None values sort correctly and clicking again reverses the order. Row numbers are shown in a dedicated index column for easier reference. Double-click a row to start editing it or enter an ID in the Edit ID box to open that row immediately. Edit dialogs stay open while you browse the rest of the data so you can reference other tables as you work. Dialogs appear centered over the main window and the selected table stays active while you work. An asterisk in the window title indicates unsaved changes and attempting to close the program will warn you if data has not yet been saved. Drop-downs, checkboxes and dialogs are implemented using Qt widgets and values entered in the edit dialogs are validated against their column type. Existing row values are pre-filled when editing or creating new rows. Adding several rows in succession works reliably and the view updates after each insert. Only tables that have been modified are written back to disk when you press the Save button, and special characters are preserved using UTF‑8 encoding.
The application can maintain relationships between tables. Use Manage Links to create connections like publication_film.pub_id -> publication.id. The dialog groups links by their source table so all connections from e.g. publication_film appear together. The links dialog stays open so you can inspect other tables while editing. When a linked value is edited the target table is checked for a matching entry and you will be prompted to create it if missing or add a new row directly from the drop-down. Links are saved in links.json. When adding a new column you can also create a link immediately. Select "Create link" in the dialog and choose the target table and column. The column type will automatically match the target column and the type selector becomes disabled while the link option is active. The application checks that both tables and columns exist and warns you if the link cannot be established. Opening Manage Links or deleting tables/columns scans for invalid links and removes them immediately. The removed links are listed in a message box so you know exactly which connections were affected.
Each table may include metadata fields such as license, last_updated, persistent_identifier and info. Missing fields are created automatically when loading the files. Use the Metadata button to edit these values. The dialog lets you add or remove metadata keys and apply the changes to all tables at once. last_updated stores a Unix timestamp and is refreshed whenever a table is saved. It is displayed in the metadata dialog but cannot be edited.
Cells containing lists or objects are shown as read-only previews. Their original structure is preserved on save so non-standard values never get converted to strings.
To create a single executable for Windows you can use PyInstaller. Install it and PyQt6 once via pip and run:
pyinstaller --onefile --noconsole json_gui.pyThe resulting dist/json_gui.exe can be distributed without requiring Python to be installed on the target system.
This project is released under the GNU General Public License v3.0 (GPL‑3.0).
© 2025 MCDCI. All rights reserved.
You may redistribute and/or modify this software under the terms of the GPL v3 as published by the Free Software Foundation.
A copy of the full license text is included in LICENSE.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GPL v3 for more details.