geofffranks / spruce

A BOSH template merge tool
MIT License
433 stars 78 forks source link

Numbers are rounded #362

Open Feofilakt opened 2 years ago

Feofilakt commented 2 years ago

Hello! Numbers are rounded and converted to exp notation: https://play.spruce.cf/#39a2a4d6ebafb495ede3dc87a4723512

--- # first.yml
some_data: this will be overwritten later
--- # second.yml
some_data: 4200000.42

some_data: 4.2000005e+06

Its a bug or feature?

geofffranks commented 2 years ago

This is also part of the https://gopkg.in/yaml.v2 library. See https://github.com/go-yaml/yaml/issues/669 for more details.

Feofilakt commented 2 years ago

If I understood that issue correctly, there is an option "%g" that must keep accuracy