khonsulabs / rsn

Apache License 2.0
11 stars 3 forks source link

A “nondestructive” or modifying serializer #8

Open ModProg opened 1 year ago

ModProg commented 1 year ago

I was experimenting with this idea for TOML (https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=dbda15adfbdf58defcaf2c5707a3a033). While obviously worse from a performance standpoint, I think having a Serializer that preserves whitespace and comments if possible and only updates modified values could be quite neat.

ecton commented 1 year ago

could be quite neat

Yes, yes it could. I delegate this task to you though, because I really don't want to try to implement it :)

ModProg commented 1 year ago

No worries, I'll look into it :D when we have a value type that can lossless describe an rsn file, this should be very doable.