this post was submitted on 01 Feb 2024
0 points (NaN% liked)

Programming

17278 readers
346 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] brettvitaz@programming.dev 0 points 8 months ago* (last edited 8 months ago) (1 children)

Every time I have reached for TOML I have ended up using JSON. The first reason is that Python standard library can read but not write TOML, which is generally useless for me. The second reason is TOML does not add any benefit over JSON. It’s not that much easier to read and IMO JSON is easier to write by hand because the syntax rules are completely obvious.

[–] eager_eagle@lemmy.world 0 points 8 months ago (1 children)

TOML is mainly for humans to write, certainly not a good choice if you're programmatically writing files - comments and formatting would be lost.

[–] Flipper@feddit.de 0 points 8 months ago

It all depends on the library you use. Rust has you covered with toml_edit. It is what is used for all the cargo commands editing the Cargo.toml file.