Skip to content

Conversation

acastle
Copy link
Contributor

@acastle acastle commented Feb 15, 2022

These changes remove the json encoding/decoding steps that are performed during the serialization of ini and dotenv files. This roundtrip loses type information during the transformation which causes values to be incorrectly converted to the json marshaller defaults (int becomes float64, bool becomes string, etc, etc). In place of this json encoding the mapstructure library allows for a direct conversion between the Metadata struct and map[string]interface{} needed to leverage the stores.Flatten and stores.Unflatten functions.

In addition this adds mapstructure tags to the metadata structures to allow backwards compatibility with the json encoding.

Resolves #879 & #857

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decrypt with output-type dotenv panics on numbers
3 participants