In xml i can include a file in a another xml file and use it. This is usefull if your software get the configuration file from xml but doesn't have any method to separate configuration like apache/ngnix(nginx.conf - site-available/ - site-enable/).
file A:
<!DOCTYPE icecast [
<!ENTITY mount SYSTEM "mount.xml">
]>
<icecast>
...
&mount;
...
</icecast>
file B:
<mount>
<mount-name>/xyz</mount-name>
<username>source</username>
<password>password</password>
<max-listeners>30</max-listeners>
<hidden>0</hidden>
<public>1</public>
<no-yp>0</no-yp>
</mount>
But what if the configuration file is in json format? Is there a method equivalent?
I need to have a better organization of my couchbase-sync bucket configuration.
There is no mechanism in JSON for including another file, like you describe. JSON is not a language in the sense that XML is, it's just the JavaScript object notation, so it only serves to describe application objects, nothing else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With