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
Thanks for the library. I use it in my project (https://github.com/fxdave/vonal-rust).
I'd like to have an option to generate comments with the keys.
Why
I create the config schema dynamically on the fly. I want to give an option to add comments to the keys. So I only need serialization. Deserialization of comments is not needed for me.
An idea for implementing it
I can imagine a Value::WithComment { value: Value, comment: String } variant.
For example:
table.insert("something",Value::WithComment{value:Value::String("some value")
comment:String::from("Some comment")})// ...
table.to_string()// this would include the comment
Alternative syntax
Value::Boolean(true).with_comment("Some comment")
Comment placement
Always above the value.
# foo commentfoo = ""# bar comment
[bar]
# baz commentbaz=false# handling# multiline# strings# would be nice lorem = "ipsum"
The text was updated successfully, but these errors were encountered:
Thanks for the library. I use it in my project (https://github.com/fxdave/vonal-rust).
I'd like to have an option to generate comments with the keys.
Why
I create the config schema dynamically on the fly. I want to give an option to add comments to the keys. So I only need serialization. Deserialization of comments is not needed for me.
An idea for implementing it
I can imagine a
Value::WithComment { value: Value, comment: String }
variant.For example:
Alternative syntax
Comment placement
Always above the value.
The text was updated successfully, but these errors were encountered: