Author Topic: ExifToolVersion should be a string  (Read 93 times)

jwag

  • Newbie
  • *
  • Posts: 6
ExifToolVersion should be a string
« on: April 18, 2019, 11:06:13 AM »
I recently upgraded to version 11.30.
When dumping tags of an image (using -hex -json) I see:

  "ExifTool": {
    "ExifToolVersion": {
      "desc": "ExifTool Version Number",
      "id": "ExifToolVersion",
      "val": 11.30
    }
  }

This is problematic since according to JSON spec - there is nothing required around precision (and I could argue versions aren't really decimal). So for example
using standard python:

json.dumps(V)
'{"ExifTool": {"ExifToolVersion": {"desc": "ExifTool Version Number", "id": "ExifToolVersion", "val": 11.3}}}'

the trailing 0 is gone.

Now - I understand completely that this is a backwards compat nightmare - probably the only real fix is to introduce a new tag name. Having a string would also allow for having exiftool versions follow semantic versioning standards

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: ExifToolVersion should be a string
« Reply #1 on: April 18, 2019, 11:23:20 AM »
The trailing zero really isn't significant.  ExifTool 11.3 is the same as 11.30.  It is easily differentiated from version 11.03 either way.  I always use only 2 digits for the minor version number.

For what it's worth, 11.30 is only the standard format I like to use.  This translates to a version of 11.3.0.0 for the Windows app.

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