What is the best file format for configuration file? Like A Duck ( @likeaduck@programming.dev ) Experienced Devs@programming.dev • 1 year ago message-square28fedilinkarrow-up132
arrow-up132message-squareWhat is the best file format for configuration file? Like A Duck ( @likeaduck@programming.dev ) Experienced Devs@programming.dev • 1 year ago message-square28fedilink
minus-square simonced ( @simonced@lemmy.one ) linkfedilinkEnglish13•1 year agoA lot of good answers but I would add one note: use a format that supports comments, and JSON is not one of those…
minus-square 𝙲𝚑𝚊𝚒𝚛𝚖𝚊𝚗 𝙼𝚎𝚘𝚠 ( @ChairmanMeow@programming.dev ) linkfedilink2•1 year agoI believe the JSON deserializer .NET ships with has options to allow C#-style comments in JSON files.
minus-square vrighter ( @vrighter@discuss.tchncs.de ) linkfedilink2•1 year agojson with comments can be parsed by a yaml parser. It’s how I write yaml, in fact (yaml is a superset of json. any valid json is valid yaml, but it also supports comments)
minus-square kersplort ( @kersplort@programming.dev ) linkfedilink1•1 year agoJSON5 is a superset of JSON that supports comments.
A lot of good answers but I would add one note:
I believe the JSON deserializer .NET ships with has options to allow C#-style comments in JSON files.
json with comments can be parsed by a yaml parser. It’s how I write yaml, in fact (yaml is a superset of json. any valid json is valid yaml, but it also supports comments)
JSON5 is a superset of JSON that supports comments.