Command line for extraction from “1_ALL-DOpus-tags.png”:
exiftool -json -struct -G ".\1_ALL-DOpus-tags.png"
“-G” causes ExifTool to print group names (File, EXIF, XMP, IPTC, PNG, Composite, etc.) before each tag name.
Command line for import to “2b_Tags-Imported-from-2a.png”:
exiftool "-json=.\2a_Tags-for-Import.json" -m -a ".\2b_Tags-Imported-from-2a.png"
“-m” is short for “-ignoreMinorErrors”
“-a” allows duplicate tags (tags with the same name but in different groups) to be extracted (or apparently imported).
If you examine the contents of “1_ALL-DOpus-tags.json”, you’d see that there are several sets of corresponding tags with the same name and/or function, in different-named groups. For example, I found the following pairs of tags to store the same string per pair, as set using DOpus’ Set Metadata dialog:
EXIF:XPComment
XMP:UserComment
IPTC:ObjectName
XMP:Title
IPTC:SpecialInstructions
XMP:Instructions
IPTC:ObjectName
XMP:Title
IPTC:Keywords
XMP:Subject
ExifTool recognizes about 125 different types (groups) of tags, of which EXIF is one. Not all of the tags written by DOpus to image files are EXIF tags, as evidenced above.
My goal in exporting and importing tags is to recreate ALL existing safe, writeable tags to the same groups in the target file. My comparison of the JSON files “2a_Tags-for-Import.json” and “2c_Tags-Exported-from-2b.json” tells me that all writeable tags from the former also exist in the latter (though they are not all listed in the same order in both JSONs), which should mean that the PNG the latter JSON was extracted from contains all those tags.