-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to write TOML files? #61
Comments
The TOML spec Array provide a sample write with a pseudo JSON object as element. contributors = [
"Foo Bar <[email protected]>",
{ name = "Baz Qux", email = "[email protected]", url = "https://example.com/bazqux" }
]
I think you can just use this object as key/value contributors = { name = "Baz Qux", email = "[email protected]", url = "https://example.com/bazqux" } Other solution can be usage of TOML Table [dog."tater.man"]
type.name = "pug" The above table should be generate the below JSON { "dog": { "tater.man": { "type": { "name": "pug" } } } }
|
this lib doesn't support that Lines 4 to 9 in 4bad34e
|
Is there any lib that supports it? |
@dzcpy looks like this one does: https://github.com/tauri-apps/tauri-toml but the last commit was in 2019 :/ You can search for other here: https://npms.io/search?q=toml |
Thanks for your reply. I found this one might be a better alternative. It supports TOML 0.5 |
Serializing toml is a strange requirement in my opinion, after all, Object2toml can have many different results. |
How do you write a js object to a TOML file?
The text was updated successfully, but these errors were encountered: