Closed shabbybanks closed 1 year ago
Yes. Opening a filestream is easy.
The problem is that the 'mental model' I have of toml files has copious comments. And those we don't have. Hence, the read/write cycle can not be idempotent.
Perhaps the read & write operations can be pseudo inverses of each other in the sense that read-write-read gives the same results as read, and write-read-write gives the same results as write.
Another option would be to allow a comment
attribute of a field to be written out as a comment in the YAML file, though that would break the pseudo-inverse property.
(btw, this is my professional account, and is not at all associated with that other shabbyguy.)
(btw, this is my professional account, and is not at all associated with that other shabbyguy.)
Ah. Had not made that connection.
there is no connection.
Of course not. Silly me.
We are about to release an updated version based on toml++ which could write TOML files. I however have no current use case but external contributions may be considered. Until then I close this as stale.
Maybe this is out of scope, but it would be nice to write a list to a TOML file. I think the upstream
cpptoml
library has an example program of serializing an object to a stream (examples/build_toml.cpp
). Perhaps that can be ported without too much headache.