Hi folks
Here's a tricky one
I'm using -xmp-lr:hierarchicalsubject to retrieve hierarchical keywords from a file.
This works fine from the macOS Terminal, giving me
Anemonefish|Australian|Amphiprion rubrocinctus
as a single string value but, when I call it from a process in my app, I get an array returned in the JSON dictionary decoded from the data
(lldb) po jsonDict
▿ 2 elements
▿ 0 : 2 elements
- key : "SourceFile"
- value : /Users/joannacarter/Desktop/Anemonefish, Australian_IMG_1299.jpg
▿ 1 : 2 elements
- key : "HierarchicalSubject"
▿ value : 3 elements
- 0 : Amphiprion rubrocinctus
- 1 : Anemonefish
- 2 : Australian
With the words in the wrong order.
Is this possibly a problem with ExifTool or should I be looking to how the data is read?
Although the data reads into an UTF8 string as
"[{\n \"SourceFile\": \"/Users/joannacarter/Desktop/Anemonefish, Australian_IMG_1299.jpg\",\n \"HierarchicalSubject\": [\"Amphiprion rubrocinctus\",\"Anemonefish\",\"Australian\"]\n}]\n"
Hi Joanna,
I don't think this is an ExifTool question. ExifTool will not split HierarchicalSubject on the "|" character.
You need to look at how your app is processing the ExifTool output.
- Phil
Hi Phil
I was afraid of that. As far as I can tell, it's buried deep in the bowels of the Apple process mechanism >:(
After all that, it turned out to be a very badly mal-formed hierarchicalsubject tag
Normal service has now been resumed :)