Main Menu

Question to JSON

Started by herb, June 21, 2018, 08:43:24 AM

Previous topic - Next topic

herb

Hello Phil,

I am working with Exiftool V11.02 on a Windows 7 system.
As testfile I used the file attached to DarwinCore at your internet side because it contains XMP tags and also structures.

(1) I created a *.json file with
exiftool.exe -json -all:all -w test.json test.jpg
and Exiftool created an outputfile with name testtest.json. I think this is an error.

This file could be re-imported using
exiftool -json=testtest.json test.jpg

(2) But when I try also to use options -g0:1 and -struct I see the following
exiftool.exe -a -g0:1 -struct -json -all:all -w test1.json test.jpg
created an output file with name testtest1.json
and for re-import with
exiftool -v -json=testtest1.json test.jpg

I get the following output on stdout:
Reading JSON file testtest1.json
======== test.jpg
Setting new values from JSON database
Nothing changed in test.jpg

and on stderr:
Can't write a structure to Adobe:Adobe
Tag 'Composite' is not defined
Sorry, EXIF:ExifIFD doesn't exist or isn't writable
Sorry, EXIF:IFD0 doesn't exist or isn't writable
Tag 'EXIF:IFD1' is not defined
Tag 'ExifTool' is not defined
Tag 'File' is not defined
Sorry, File:System doesn't exist or isn't writable
Can't write a structure to IPTC:IPTC
Sorry, JFIF is not writable
Sorry, Photoshop is not writable
Tag 'XMP' does not support alternate languages
Tag 'XMP' does not support alternate languages
Tag 'XMP' does not support alternate languages
Tag 'XMP:XMP-exif' is not defined or has a bad language code
Tag 'XMP:XMP-microsoft' is not defined or has a bad language code
Tag 'XMP:XMP-photoshop' is not defined or has a bad language code
Tag 'XMP:XMP-tiff' is not defined or has a bad language code
Tag 'XMP' does not support alternate languages
Tag 'XMP' does not support alternate languages
Tag 'XMP:XMP-xmpMM' is not defined or has a bad language code
    0 image files updated
    1 image files unchanged


Now it is unclear to me what I am doing wrong.

Thanks for your help in advance
Best regards
Herb

Phil Harvey

Quote from: herb on June 21, 2018, 08:43:24 AM
(1) I created a *.json file with
exiftool.exe -json -all:all -w test.json test.jpg
and Exiftool created an outputfile with name testtest.json. I think this is an error.

    -w[+|!] EXT or FMT (-textOut)
            Write console output to files with names ending in EXT


Quote(2) But when I try also to use options -g0:1 and -struct I see the following
exiftool.exe -a -g0:1 -struct -json -all:all -w test1.json test.jpg
created an output file with name testtest1.json
and for re-import with
exiftool -v -json=testtest1.json test.jpg

            The imported
            JSON file must have the same format as the exported JSON files
            with the exception that the -g option is not compatible with the
            import file format
(use -G instead).
...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 ($).

herb

Hello Phil,

thanks for the private lession.

Best regards
Herb