Gramps 6.0 JSON export for Gramps 5.1 / 5.2

Version 1.0.0. An export plugin for Gramps 6.0.x that creates a JSON file suitable for import through the JSON Import addon in Gramps 5.1 or 5.2.

Choose the target version in the normal Gramps export assistant. The plugin exports the entire open family tree to temporary JSONL, applies the tested compatibility adjustments, and saves the converted JSON file and one English conversion report. The temporary JSONL file is removed automatically.

The interface follows the Gramps language setting: Danish or English. Reports use English in both interfaces. Names, custom type names, places and other text from the family tree retain their original language.

Requirements

Install

  1. Close Gramps.

  2. Extract the downloaded ZIP archive.

  3. Copy or extract the project folder into your Gramps user plugin folder. Keep the complete folder structure unchanged, including any locale folder included with the project.

    The user plugin folder is normally located here:

    Replace <version> with the Gramps version folder used on your system.

  4. Start Gramps again.

  5. Check that the installed filter, rule, gramplet or tool is available where described in the project documentation.

If the project does not appear or fails to load, check Help → Plugin Manager for an error message.

Removing the test version

  1. Close Gramps.
  2. Delete the project folder that you added to the Gramps user plugin folder.
  3. Start Gramps again.

Because the project was installed only in the user plugin folder, removing that folder removes the test installation without changing the original Gramps program files.

Use

  1. Open the family tree in Gramps 6.0.
  2. Select Family Trees → Export... / Slægtsbøger → Eksportér....
  3. Choose JSON for Gramps 5.1 / 5.2 / JSON til Gramps 5.1 / 5.2.
  4. Select Gramps 5.1 or Gramps 5.2 under Target version / Målversion.
  5. Choose a new .json filename and complete the assistant.
  6. Import the JSON file into a separate family tree in the selected target version using its JSON Import addon.

For an output named family_51.json, the report is named family_51.report.md. Reports contain record/type counts, conversion action counts, role/event/place checks, input SHA-256, scope information and source references. Gramps 5.1 reports also list the From/To date adjustments in detail.

The output uses one JSON object per line, matching the receiving JSON Import addon. It is not a single JSON array. The temporary input is named Gramps6_export.jsonl; that name appears in the report even though the temporary file is removed after the operation.

Data included

The exporter reads the entire open family tree, including private records, without person filters. It exports the ten primary record categories: Note, Event, Person, Family, Repository, Place, Source, Citation, Media and Tag.

Media records and references are included. The image, audio, video and other media files themselves are not copied. The plugin does not change the open family tree and is not a complete portable backup of all database settings and media files.

Type classes handled

The compatibility conversion actively handles these eleven Gramps type classes:

Type class Gramps 5.1 Gramps 5.2
EventRoleType Standard values -1, 1–9 stay numeric; 10–18 become custom text. Standard values -1, 1–10 stay numeric; 11–18 become custom text.
EventType Standard values -1, 1–44 stay numeric; 45 (Stillbirth) becomes custom text. Standard values -1, 1–45 stay numeric.
NameType Standard values -1, 1–3 stay numeric. Same.
NameOriginType Standard values -1, 1–12 stay numeric, including value 1 with an empty standard name. Same.
PlaceType Standard values -1, 1–20 stay numeric. Same.
FamilyRelType Standard values 0–3 stay numeric; CUSTOM is 4. Same.
ChildRefType Standard values 0–6 stay numeric; CUSTOM is 7. Same.
NoteType Standard values -1, 1–26 stay numeric; 27 (Analysis) becomes custom text. Standard values -1, 1–27 stay numeric.
UrlType Standard values -1, 1–4 stay numeric. Same.
RepositoryType Standard values -1, 1–9 stay numeric. Same.
SourceMediaType Standard values -1, 1–13 stay numeric. Same.

For these classes:

Type classes not actively converted

Type class Handling and test coverage
AttributeType Passed through unchanged. The custom attribute Sammenflettet Gramps-ID was tested successfully in both target versions. Other attribute types have no additional compatibility conversion.
SrcAttributeType Passed through unchanged; not covered by the original test-data audit.
StyledTextTagType Passed through unchanged. This is a styled-text formatting type and is not normalized as one of the eleven genealogical type classes. It was not covered by the original audit.
MarkerType Passed through unchanged. This legacy type was not covered by the original audit.

Passing a class through unchanged does not establish compatibility for every possible value or data form. Other fields and classes are also passed through unchanged, except for the Gramps 5.1 date adjustments below.

Date compatibility

V6 date modifier Gramps 5.1 output Gramps 5.2 output
7 — From 2 — After 7 — From, unchanged
8 — To 1 — Before 8 — To, unchanged

The Gramps 5.1 adjustment is an approximation, because that release series does not support From/To. The 5.1 report records the affected dates and their original values. Other date modifiers are not changed by this conversion.

Verification and limitations

The original conversion scripts were tested by the user in Danish and English Gramps 5.1 and 5.2. The user subsequently tested the integrated exporter and imports into both target versions and reported matching output and no observed discrepancies. The Danish interface translation was also reviewed and approved by the user.

The tested family tree contains 2,208 people. The original handover recorded 8,020 records; the later local regression file contains 8,027 records. RepositoryType and SourceMediaType were also tested separately with manually added data.

Local regression checks compare the converted JSON with the previously approved scripts. They also check type mappings, date adjustments, record counts, English/Danish interface selection, overwrite protection and temporary-file cleanup. These checks supplement the user's Gramps tests; they do not cover every possible database.

The converter preserves the tested Gramps data structures and performs compatibility adjustments required by Gramps 5.1/5.2. Because Gramps databases may contain custom and rarely used data types, an exact 1:1 conversion of every possible database cannot be guaranteed.

Existing output and report files are refused, even if the standard export assistant offers an overwrite confirmation. Choose a new filename. A write failure, such as a full disk, can leave a partial output file; investigate the error and use a new filename for the next attempt.

Package files

File Purpose
GrampsV6ToV5Export.gpr.py Registers version 1.0.0 as a Gramps 6.0 exporter.
GrampsV6ToV5Export.py Export-assistant interface and automatic temporary JSONL export.
converter_bridge.py Selects the converter for the chosen target.
V6_to_V51_1_0_0.py Gramps 5.1 compatibility conversion and English report; declares __version__ = "1.0.0".
V6_to_V52_1_0_0.py Gramps 5.2 compatibility conversion and English report; declares __version__ = "1.0.0".
locale/da/LC_MESSAGES/addon.mo Compiled Danish interface translation.
po/da.po Editable Danish translation source.
README.md Installation, use, type coverage and limitations.
RELEASE_NOTES.md Release history.

The conversion modules can also be run with Python independently of the Gramps interface:

python V6_to_V51_1_0_0.py INPUT.jsonl OUTPUT.json python V6_to_V52_1_0_0.py INPUT.jsonl OUTPUT.json

References

License

GNU General Public License v2 or later, like Gramps.

PROJECT WEBSITE

https://myown-project.dk/