apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.2k stars 10.21k forks source link

support HOCON format #2164

Open victoryxs opened 5 years ago

victoryxs commented 5 years ago

My company use inner config object with typeSafe config, we often use HOCON format to edit config file. But apollo only support yml/yaml/properties/json. We must first convert HOCON to json, and then poll apollo. Can apollo support HOCON format?

nobodyiam commented 5 years ago

Currently there is no validation against json format, so you may input anything into a json namespace, e.g. HOCON format.

To support HOCON format, since there is no validation or parser support, it is kind of easy. Simply adding a new format enum and a client side api should be enough. Although I doubt whether it makes much sense.

Another concern is I guess this format is not widely used now?

victoryxs commented 5 years ago

typesafe config support read from string and parse json/yaml/hocon, i think Apollo can use typesafe config as inner config object

amosJinCloudwise commented 5 years ago

我也觉得应该支持hocon, 做为json的父集, 在语法上有很多改变与优势, 例如置换以及值连接. 而且typesafe对hocon做了支持.用起来很方便.

nobodyiam commented 5 years ago

Thanks for the suggestion!

TopSpoofer commented 4 years ago

不支持HOCON还是比较麻烦