ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: jhimmy dingo on December 15, 2023, 10:22:17 AM

Title: Writing to JSON files
Post by: jhimmy dingo on December 15, 2023, 10:22:17 AM
Trying to write to a JSON file I got the response, "Error: Writing of JSON files is not yet supported"

Just putting in a request to be able to write to JSON files.

In the meantime, does anyone know of a way similar to ExifTool for writing to JSON files?

Thanks
Title: Re: Writing to JSON files
Post by: StarGeek on December 15, 2023, 10:45:42 AM
Editing a JSON file is unlikely to be supported as there isn't a set of standard tag names.  It would need to write free form TAG/VALUE pairs, which would probably require extensive re-writing of exiftool.

I've used jq (https://jqlang.github.io/jq/) to deal with JSON files, but never used it enough to get the hang of it.

Another program in my notes that I haven't tried is Miller (https://github.com/johnkerl/miller), which says it "is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON"
Title: Re: Writing to JSON files
Post by: jhimmy dingo on December 17, 2023, 08:52:04 PM
Thanks for the good info--I have a lot to learn!