patrickhuber / wrangle

Wrangle is a solution for managing multiple configuration stores and multiple command line interfaces across multiple environments.
0 stars 0 forks source link

add json file support for the `file` store #24

Open patrickhuber opened 6 years ago

patrickhuber commented 6 years ago

Both YAML and JSON files are hierarchical so use the go json parser to read in a file with extension type .json as a generic go structure to be used as data for the store.

patrickhuber commented 6 years ago

An encoding field could be added.

If the encoding is not specified, it will fall back to the following rules for resolution:

  1. if encoding is present, use encoding value
  2. if extension is present:
    • if extension is yml, yaml use yaml encoding
    • if extension is json use jason encoding
    • if extension is xml use xml encoding
  3. if extension is not matched, fail