This directory just contains some example data with related output*.
To run this example simply use stack exec config-joiner-json -- -c common.json -s src -t target
from this directory. If the binary is in your path then the above command is simplified to config-joiner-json -c common.json -s src -t target
These files highlight some key usages of config-joiner-json
.
The common.json
file is the file that all other configuration files share in common or inherit from.
This is the simplest use case and simply joins a specific configuration, config1.json
, to
the common case. There is minimal nesting of joins and no overriding of fields.
This file highlights how fields are overridden in the configuration files - when two string
, number
, or array
fields have the same key config-joiner-json
always takes the more specific field (not inherited from common.json
).
This file shows in more detail how objects
are joined.
*The JSON in target
is generated by config-joiner-json
and additionally run through a pretty printer for demonstration purposes.
Pretty printer: cat <generated file> | python -m json.tool > tmp_json