Hello Phil,
I hope not to annoy you again with my questions.
During past weeks I asked many many questions and very often you answered: it is better to use -json output.
Well, I started to use -json option and have the following question:
I have a *.jpg image that contains 2 tags with identical name: -iptc:DateCreated and -xmp-photoshop:DateCreated
When I use the following command
exiftool.exe -json -l -a -api struct=2 -all:all testimage.jpg
I get only 1 tag displayed for DateCreated.
When I add e.g. option -g0:1 I get displayed both tags DateCreated
I had expected that always both tags are displayed because of option -a.
Thanks for help in advance.
Best regards
Herb
Hi Herb,
From the -json documentation:
The -a option is implied if the -g or -G options are used,
otherwise it is ignored and duplicate tags are suppressed.
This is because JSON names must be unique.
- Phil
Hello Phil,
thanks for your quick reply and sorry, I have overseen this detail in documentation.
Best regards
Herb
Note that you can use -g0:1:4 to make sure JSON names are unique for all tags. I will update the documentation to mention this:
The -a option is implied if the -g or -G options are used,
otherwise it is ignored and tags with identical JSON names
are suppressed. (-g4 may be used to ensure that all
tags have unique JSON names.)
- Phil