How can i stringify toml comment?
See original GitHub issuehey iarna~ this parser is so convenient to convert between toml and JSOject.
but i have one question about that how can i insert the toml comment when i use TOML.stringify
method to convert one js object to toml text?
i will appreciate it if u can give me some advice. thx a lot.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Developers - How can i stringify toml comment? - - Bountysource
How can i stringify toml comment ?
Read more >@scampersand/toml - npm
Start using @scampersand/toml in your project by running `npm i ... If an object TOML.stringify is serializing has a toJSON method then it ......
Read more >Toml | npm.io
interpret, @iarna/toml, toml, cosmiconfig-toml-loader, gray-matter, tomlify-j0.4, convict, remark-frontmatter, toml-j0.4, pajv, micromark-extension-fr.
Read more >TOML to JSON / Simon Willison | Observable
toml = Module {version: "1.35.3", parse: ƒ(source, specificationVersion, multilineStringJoiner, useBigInt, xOptions), stringify: ƒ(rootTable, options), ...
Read more >toml - Rust - Docs.rs
use toml::Value; let value = "foo = 'bar'".parse::<Value>().unwrap(); assert_eq!(value["foo"].as_str(), Some ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@iarna Perhaps. In my head the hard thing with comments is that they don’t have an unique identifier, which means that they can not be easily represented in a POJO. The first solution that came to me was to use random identifiers for comments. The issues with that are pretty obvious though, as there is a risk for collisions between comments and actual keys. Also, it’s not a very friendly interface for developers.
Another idea might be to tie comment to properties, and return a separate object containing comments. For example:
At this time, comments are not supported. The biggest limitation is just figuring out how this would be represented. It would be useful for someone interested to spend some time working up examples of how this might work… what the source object versus resulting TOML would look like, and vice-versa.