Closed denfren closed 10 months ago
Looking at the coercion logic I start to think that maybe it's better to accept that in the end everything is kind-of f64 and accept that .0
may not be written.
JSON (and by extension probably YAML) also don't care about the underlying data type
I noticed when using
dts
that floats are mangled when outputting hcl. I found this:https://github.com/martinohmann/hcl-rs/blob/796707ab4ebfe6b83996aef4cce8d58ae2d51ced/crates/hcl-primitives/src/number.rs#L53-L58
Would it be an option not to do that and instead preserve the type?