Open Gaalidas opened 4 years ago
Hi, this lib was battle tested with JSON and XML, however YAML support it is mostly experimental. Some users already helped in the past to improve a bit, but YAML is a really weird format with many edge cases. Can you provide a simple example of YAML syntax that is not parsed correctly?
True enough. While my original issue was with my own in-house collections I made that were acting faulty, I tried again this morning and sure enough I had to add a case for the "#" being used as a comment character, and now it won't recognize the "- " set as being the start of a new item in a list of items. I think I can use your code as a template, but I'm going to have to rewrite the majority of it. I wouldn't use YAML, but I'm trying to aid myself in editing some game configs in which the developers, in their obvious insanity, decided to use YAML to handle it.
I've moved on from testing with those configs, however, and am now trying something from an example found on a website that does, I think, interactive children's books? I dunno actually, I barely payed attention to the subject matter. their example isn't even related to their stuff anyway.
Here's the YAML I'm testing with: (dunno why the top line is parsing as needing to be huge in the comment though)
`
name: Martin D'vloper job: Developer skill: Elite employed: True foods:
Anyway... I'll update further if I come up with anything good. I'm also experimenting with getting this thing to interact with the built-in XmlDocument class so that you can export or read from those. That would simplify things in my other classes that edit those formats. This would all be so much easier if the online yaml tools were available in C# sources... or any sources for that matter.
I'm really starting to wonder if I'm just stupid here. I've been trying for hours to get this thing to load a simple Yaml file and save it as an Xml. It won't do it. complains constantly about badly formed lines or not having the right number of items in it's array or some other crud. It obviously had to idea what a comment is in the format, and it doesn't recognize two spaces as proper indentation, which is proper indentation for a yaml item in a node. Is this thing meant to parse some form of yaml that came before the current yaml? As it is I'm back to square one in trying to figure out how to parse each line of a test file for expected YAML syntax. I got excited for nothing.
In fact, all I've got here is a good example of how to set up some methods for doing conversions of this sort. Functionally, though....well... it's not.