Page 1 of 1

invalid json output with -verbose

Posted: 2017-10-29T09:15:53-07:00
by squadjot
Outputting to json using the commandline with the -verbose option creates invalid json.

Code: Select all

convert -verbose mypic.jpg json:-
Reason is that backslashes has to be escaped with (double backslash), so it breaks at the filepaths

Incorrect:

Code: Select all

{ name: "c:\some dir\myfile.mp4" }
Correct :

Code: Select all

{name: "c:\\some dir\\myfile.mp4"}
https://jsonlint.com/

Re: invalid json output with -verbose

Posted: 2017-10-29T09:23:59-07:00
by squadjot
Oops, i was using and older version of convert, i think the output is different now, it doesent contain the filepath anymore with v7.0.7-8