Including namespace in JSON keys

Started by Retrography, April 02, 2019, 09:35:21 AM

Previous topic - Next topic

Retrography

I have learned that I can extract the group names along with the tags in the JSON output using the -G switch. But is there any way that I get the namespace out as well? Note that after modifying the extracted tags I need to write them back to a file using exiftool, so it is important that the format is readable as input for exiftool.

More particularly, this is what I need:

Right now for the following XML/RDF line:

<XMP-prism:DOI>10.1016/j.jtemb.2017.11.012</XMP-prism:DOI>

We get the following JSON line (with -G):

"XMP:DOI": "10.1016/j.jtemb.2017.11.012"

Is there a way to obtain the following?

"XMP-prism:DOI": "10.1016/j.jtemb.2017.11.012"

Thanks

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).