ExifTool Forum

ExifTool => Developers => Topic started by: sebutzu on January 03, 2025, 04:38:22 PM

Title: Setting tags from JSON file - null for remove
Post by: sebutzu on January 03, 2025, 04:38:22 PM
Is it possible to treat a null value for a TAG in a JSON file (using -j=JSONFILE) as remove tag? From JSON point of view it would make sense to do this. Otherwise if we need to remove tags, we need to set the value to "-" (using -f), which is a bit strange to do for tags that are numbers...to set a string as a value.
If it is not possible, could we have a flag in the future to treat JSON null as a remove?
Thanks a lot!
Title: Re: Setting tags from JSON file - null for remove
Post by: Phil Harvey on January 03, 2025, 09:03:42 PM
You can delete a tag with a value of an empty string in the JSON file by using the -f option and setting -api missingtagvalue^=

- Phil