logoalt Hacker News

arp24212/09/20242 repliesview on HN

Your TOML is rather convoluted, a more normal way to write it would be:

  [a]
  b = [{x = 1}]
  y = 2
Or alternatively:

  a.b = [{x = 1}]
  a.y = 2
Some parsers allow newlines in TOML inline tables, so you can do:

  a = {
    b = [{x = 1}],
    y = 2,
  }
That's supposed to be in the next TOML standard, but that seems indefinitely stalled as the (only) maintainer has seemingly lost interest and there hasn't been any movement for a long time.

Replies

michaelcampbell12/11/2024

> Your TOML is rather convoluted, a more normal way to write it would be

Anecdata, granted, but I've seen a lot of TOML written exactly like the "convoluted" example, and none like your more spread out version.