New YAML Library - VSoft.YAML

Hi All

I have released a new YAML Parser/Emitter library for Delphi XE2 or later. It is pure delphi code, tested with Win32 and Win64 but it should work for other platforms too (no winapi dependencies).

  • Supports YAML 1.1 (partially) & 1.2
  • JSONPath queries with filter expressions
  • Multiple Document streams.
7 Likes

This is truly epic code. I love the use of the factory methods too - makes the code much more succinct and idiot-proof. Nice work!

1 Like

Thanks @ianbarker

I put a lot of effort into rewriting the code that replit/claude/gemini spat out :wink:

This is the first time I have really used ai with a project (other than to generate unit tests) - it was a useful exercise - ai can be helpful for getting something started, but it’s really a junior coder so you have to be prepared to refactor. I certainly learned a lot about using ai in the last week!

FWIW I pushed some changes last night and this morning to fix some locale issues - and I can now confirm it runs on linux - should run on OSX and mobile too.

1 Like

The library can now also parse and write JSON - since YAML 1.2 is a superset of JSON. So you can use the library for converting betwee json and yaml and back again :slight_smile:

2 Likes

I was going to post about you could look into getting into the below project… last night… but it looks like you are already looking into it!

Yes I forked and have been playing with it. I ended up adding a JSON mode to the parser options to allow for parsing json that would not parse before.

VSoft.YAML passes all the the validity tests now, but doesn’t do so well with performance. I have made some improvements, but I probably won’t get to the performance of some of the other libraries unless I completely rewrite to use records rather than interfaces. I’ll see how far I can get without that first.