liunaijie commented on issue #8563:
URL: https://github.com/apache/seatunnel/issues/8563#issuecomment-2606330614

   
   
   > 
最好的方式是restapi能够支持hocon格式,如果支持不了的话,能不能提供hacon格式转换为json格式的工具,或者文档说明,因为我发现官方文档对于json格式这块描述的不是很多。我尝试用一些工具直接将hacon格式转换为json,发现是行不通的,因为有一些字段差异。
   
   
   Hi, the sample code about convert hacon to json is : 
   ```
   public static final ConfigRenderOptions CONFIG_RENDER_OPTIONS = 
ConfigRenderOptions.concise().setFormatted(true);
   Config config =  
ConfigFactory.parseFile(filePath.toFile()).resolve(ConfigResolveOptions.defaults().setAllowUnresolved(true));
   log.info(config.root().render(CONFIG_RENDER_OPTIONS))
   ```
   
   You need import `seatunnel-config-shade:2.3.9` (You need use 2.3.9, 2.3.9 
has some fix.)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to