invalid json output with -verbose

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
squadjot
Posts: 8
Joined: 2016-10-07T06:58:41-07:00
Authentication code: 1151

invalid json output with -verbose

Post 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/
squadjot
Posts: 8
Joined: 2016-10-07T06:58:41-07:00
Authentication code: 1151

Re: invalid json output with -verbose

Post 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
Post Reply