Skip to content

Latest commit

 

History

History

example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Example Usage

This directory just contains some example data with related output*.

Run It

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

Examples

These files highlight some key usages of config-joiner-json.

common.json

The common.json file is the file that all other configuration files share in common or inherit from.

config1.json

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.

config2.json

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).

config3.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