Adds --json flag to output error messages in JSON format

The PR adds a flag that returns feedback about the conversion (success/failure + warnings) in JSON format.
This is useful if this script is called by another one and the results need to be parsed.

Let me know if you need additional information.