Closed carmeloMagna closed 4 years ago
@carmeloMagna are you parsing the output from stdout or piping to a file?
Validation complete.
is going into stdout only. If you run validate with the -r
flag, you can output the data to a JSON file and it will not contain that data.
-r,--report-file <file name> Specify the report file name. Default
is standard out.
Hi @jordanpadams, thank you for the suggestion.
well, I'm writing a web-based service based on the validation script for my reseach group. So, I call the validate script code using php shell_exec() function (of course sanitarizing the inputs first). So yes, actually I'm retrieving the results from stdout.
The solution you are suggesting is a little bit complicated since php does not know when the file is available. I'm actually using a work around that is to match and remove the Validation complete.
statement from the output before to parse the JSON in a normal object and it works.
I think the problem has to be treated as a real bug and fixed in the future, even if several work around exist.
Kind regards and thank you again,
Carmelo
@carmeloMagna we will add this to the list. thanks!
@carmeloMagna we actually just pushed out a new version of validate to fix another critical bug, and it looks like this is no longer a problem in the latest version. please take a look and let me know if this version fixes your issue. https://nasa-pds-incubator.github.io/validate/
Dear @jordanpadams, I checked your last version 1.18.1 and the problem disappeared.
Thank you for your support! kind regards, Carmelo
Describe the bug JSON Output is malformed, a spurious string "Validation complete." appears in between the JSON output.
To Reproduce Steps to reproduce the behavior:
validate PDS4_file.xml -x <xsd/files> -s JSON
Obtained Output