Extra commas in JSON output

Started by Hans Hansen, April 24, 2020, 09:54:40 AM

Previous topic - Next topic

Hans Hansen

Hey,

first of all: Great tool! Playing around with it taught me alot.

I'm working on a small app to extract and alter meta data. I'm extracting the data in JSON format, where I noticed that sometimes the output is a bit "dirty", requiring to clean it up before parsing it (all with javascript). So, sometimes (couldn't figure out the pattern yet) I get extra commas where there should't be one. After some testing around with this, it occurs almost always on position 8192 of the output. (so, sometimes I get double comma, comma before or afer colon....
Although not always, this seems to happen after I write data to the file (change Dates, change Filename, add custom tags....), all with very basic patterns like exiftool file/folder (-json) (tag=val) ....

Its not a big thing to get these extra commas out, but since the position is more or less always the same.....  Any idea why this might happen?

Thanks in advance!

Uli


Well still learning alot from this tool.... Just when I hit the publish button I realized that it's about the max size of data packages/ chunks from stdio. I should check that glue I'm using....

Phil Harvey

Hi Hans,

Try to be sure this happens from the command line.  If it does, then email me a sample file and tell me the exact command you are using so I can try to reproduce this?  My email is philharvey66 at gmail.com

However, I would be surprised if ExifTool was doing this.

- Phil
...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 ($).