You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using "yarn" to issue my command instead of npm.
After using xml-js to convert my files, it makes the xml file but does not retain the information within the .json file.
Command Prompt Line used:
I had the same issue: no output from a JSON->XML run, and no errors logged. Although, I'm not sure that is necessarily a problem with this package (although, an error or hint of some kind would be nice, when there is empty output).
I figured out my issue, which was that my input JSON was incorrectly structured. I used the CLI to validate manually by giving it good, expected XML, and got JSON out. I then compared the good JSON (expected) to my JSON (actual) and was able to find my structural errors. Specifically, my issue was that I mixed compact and non-compact in my JSON, which caused the empty output without errors—it seems that there are allowed/expected keys in non-compact that will just cause the parsing to break (understandably).
It would be cool if this package offered validation tooling, but I can see how that might fall out of scope for this package, especially if the "non-compact" and "compact" structures are standards. (I'm a bit unfamiliar with the XML <-> JS tooling, but after reading the README I expect those structures are sort of common or standards across similar APIs/tools?)
I'm currently using "yarn" to issue my command instead of npm.
After using xml-js to convert my files, it makes the xml file but does not retain the information within the .json file.
Command Prompt Line used:
yarn xml-js C:\Users\Solis_a\Selenium-Tests\results-2023-06-27T13-31-20.567Z.json --spaces 4 --out C:\Users\Solis_a\Selenium-Tests\results-2023-06-27T13-31-20.567Z.xml
Am I entering the line improperly or is it a file issue?
The text was updated successfully, but these errors were encountered: