in reply to Re^3: python YAML output, perl Loader, which version?
in thread python YAML output, perl Loader, which version?
Let me explain again: I am testing product code that is being written in python. The product outputs what it outputs, WITH the inconsistent indentation, and I do not control that. The String is to show the nature of the problem without having to discuss details of the product, which do not matter for this problem and solution. Because the YAML output is considered to be valid by yamlint, the people writing the product code do not consider their code to be broken. I need to write perl tests which extract data from the output, in order to make sure that the content of the output is correct. In order to do this, I need to parse the output WITH the inconsistent indentation, which yamlint can do. The YAML Loader in perl's YAML::Old cannot parse the output and considers the output to be invalid. I strongly suspect that some newer YAML Loaders for perl would parse the output just fine, but there are so many newer YAML Loaders, and I am not sure which are fully working and finished.
I guess I could blindly try whatever YAML Loaders for perl I can find until one of them works on this peculiarity, but since I expect to need to parse other YAML for these tests, with other peculiarities, I would rather choose the YAML Loader which is in the best shape, which I suspect means the Loader which is most compatible with the most recent or inclusive YAML spec.
So, which Loader do I want?
Am I making the problem clear yet?
As to why the python behaves as it does, I suspect that this has to do with how PyYAML works.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: python YAML output, perl Loader, which version?
by Anonymous Monk on Apr 16, 2014 at 23:03 UTC |