ExifTool Forum

ExifTool => Developers => Topic started by: sebutzu on January 05, 2025, 04:48:40 AM

Title: With -j (JSON output) is there a way to ask for tags both with and without conv
Post by: sebutzu on January 05, 2025, 04:48:40 AM
With -j (JSON output) is there a way to ask for tags both with and without print conversions?
I tried -all -all# but it does not return what I would expect (meaning tags with and without print conversions).
Is there a way to do this?
Thanks
Title: Re: With -j (JSON output) is there a way to ask for tags both with and without conv
Post by: StarGeek on January 05, 2025, 09:26:53 AM
Quote from: sebutzu on January 05, 2025, 04:48:40 AMWith -j (JSON output) is there a way to ask for tags both with and without print conversions?
I tried -all -all# but it does not return what I would expect (meaning tags with and without print conversions).

The tag names with and without the number sign would be the same. From the docs on the -j (-json) option (https://exiftool.org/exiftool_pod.html#j-JSONFILE--json)
QuoteThe -a option is implied when -json is used, but entries with identical JSON names are suppressed in the output.

The docs go on to mention using the -G4 (-groupNames4) option (https://exiftool.org/exiftool_pod.html#G-NUM-:NUM...--groupNames), but that still doesn't give both values.
Title: Re: With -j (JSON output) is there a way to ask for tags both with and without conv
Post by: greybeard on January 05, 2025, 10:00:06 AM
I've been through this as well - the only way I've found is to run the json command twice - not ideal.
Title: Re: With -j (JSON output) is there a way to ask for tags both with and without conv
Post by: Phil Harvey on January 05, 2025, 05:30:46 PM
Add the -l option.

            Adding -l adds a "desc" field, and a "num"
            field if the numerical value is different from the converted
            "val", and "fmt" and "hex" fields for EXIF metadata if the API
            SaveFormat and SaveBin options are set respectively, and the
            length of the "hex" output is limited by the API LimitLongValues
            setting.

- Phil