JSON alternatives (for the purpose of specifying configuration)?

后端 未结 8 2521
悲&欢浪女
悲&欢浪女 2021-02-19 20:31

I like json as a format for configuration files for the software I write. I like that it\'s lightweight, simple, and widely supported. However, I\'m finding that there are some

8条回答
  •  南旧
    南旧 (楼主)
    2021-02-19 20:51

    For configuration you could use an embeddable scripting language, such as lua or python, in fact this is not an uncommon thing to do for configuration. That gives you multiline strings or here documents, and comments. It also makes it easier to have things like the boolean function you describe. However, the scripting languages are, of course, Turing complete.

提交回复
热议问题