LunarParser icon indicating copy to clipboard operation
LunarParser copied to clipboard

Add support to YAML

Open Relfos opened this issue 7 years ago • 2 comments

Support for YAML. Should use the same interface / naming conventions as the JSON and XML parsers.

More info on the format http://www.yaml.org/start.html

Relfos avatar Oct 20 '17 15:10 Relfos

Hi Relfos, first of all thanks for sharing you Work! Unfortunately i am having a little issue while converting XML to YAML.

For example the following XML:

Value 1 Value 2

is converted to YAML as:

--- # : xmlNode: childNode: item1:Value 1 item2:Value 2

Which is not parseable. A parseable YAML string would be:

xmlNode: childNode: item1: Value 1 item2: Value 2

The first two Lines seem to be obsolete, and "item1:Value 1" needs to be "item1: Value 1".

Hope this might be helpful, Simon

simondankelmann avatar Nov 09 '18 11:11 simondankelmann

Hi Simon, this library support for YAML is still very experimental, as while I use this library exhaustively for several products, the only part that is really battle tested is JSON and XML.

Can you include a bit of code that generates that example of conversion from XML to YAML with those sample values? That would make it faster for me to fix the problem, thank you!

Relfos avatar Nov 09 '18 16:11 Relfos