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
If you want to serialize data from code down to KDL, Kadlet really wants to get in your way at the moment. KdlDocument and KdlNode are immutable, and there is no builder or other easy way to progressively create KDL data as you go through an object. On top of that, KdlNodes are expected to keep track of their own indentation level, meaning getting pretty-printed KDL that was created exclusively from code is functionally impossible. Right now Kadlet is great for deserializing KDL, but these issues make it a lot more work than it should be to serialize it.
It seems a few of these issues are fixed with Kadlet 0.2.0, but that's not currently available on Nuget.
The text was updated successfully, but these errors were encountered:
Thank you for your feedback and apologies for the late reply. I admit Kadlet's API isn't the nicest to work with, this was pretty much my first attempt at making a published library and there are several aspects that could have been done differently. When KDL v2 is officially out I plan on reviewing the codebase and take this into account.
Something I wanted to add is a KdlWriter object that constructs a KDL document programmatically and outputs it to a stream, but I assume this still wouldn't fit your use case. What does it look like, so I can have a better idea of what would work for you?
The big thing with a KdlWriter like that is that node children are stored as a document as well, so being able to construct a KdlDocument easily and keep it around as a KdlDocument is critical if you want to construct KDL from code with the way the library is currently set up.
If you want to serialize data from code down to KDL, Kadlet really wants to get in your way at the moment.
KdlDocument
andKdlNode
are immutable, and there is no builder or other easy way to progressively create KDL data as you go through an object. On top of that,KdlNode
s are expected to keep track of their own indentation level, meaning getting pretty-printed KDL that was created exclusively from code is functionally impossible. Right now Kadlet is great for deserializing KDL, but these issues make it a lot more work than it should be to serialize it.It seems a few of these issues are fixed with Kadlet 0.2.0, but that's not currently available on Nuget.
The text was updated successfully, but these errors were encountered: