Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

Best way to manipulate variables inside a JSON config file in Python3

$
0
0

I want to have a JSON config file where I can reference values ​​internally. For example, consider this JSON config file at bellow:

{
  "hdfs-base":"/user/SOME_HDFS_USER/SOME_PROJECT"
 ,"incoming-path":"$hdfs-base/incoming"
 ,"processing-path":"$hdfs-base/processing"
 ,"processed-path":"$hdfs-base/processed"
}

The main idea is to leverage values already stored in json object. In this case, replacing '$hdfs-base' to 'hdfs-base' attribute's value. Do you know something that do that already? I don't wanna use ConfigParser module because I want to use JSON.

Thanks!


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>