Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marshal method for HCL Parser #152

Closed
wants to merge 1 commit into from

Conversation

amarlearning
Copy link
Contributor

Changes:

  1. Implemented Marshal method for HCL Parser.
  2. Updated the unit test for the same.

Updated the unit test of the Marshal method
@amarlearning amarlearning changed the title Implemented Marshal method for HCL Parser Marshal method for HCL Parser May 12, 2022
@amarlearning
Copy link
Contributor Author

@knadh ready for review :)

@knadh
Copy link
Owner

knadh commented May 16, 2022

Thanks for the PR @amarlearning. Please see:

HCL:JSON (and other schema) do not map 1:1 due to differences in semantics, which means if you read from a JSON config and marshal to HCL, what comes out may be different, which can be dangerous. That's why HCL marshalling has been left unimplemented.

@knadh knadh closed this May 16, 2022
@amarlearning
Copy link
Contributor Author

@knadh have a look at this viper implementation, they also did it but in a slightly different way

@knadh
Copy link
Owner

knadh commented May 16, 2022

I don't think that addresses the incompatibility between JSON and HCL specs.

Came across this: spf13/viper#967

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.

None yet

2 participants