Description
What steps did you take:
ytt
appears to convert input floats to integers, for example, running the command below:
echo 1.0 | ytt --file=-
I am passing ytt
a single floating point number - 1.0 - encoded as YAML.
What happened:
The output from ytt
is an integer:
1
What did you expect:
I expected the output to be a float:
1.0
Anything else you would like to add:
I understand that integer and floating point data types differ in the YAML spec. This is a simplified example from input to an application. That application behaves differently if its YAML input contains an integer or a float. In the actual use case these numbers are embedded inside more complex structures.
Environment:
Version:
% ytt --version
ytt version 0.45.0
OS Fedora Linux 26 on AMD 64.
/etc/os-release
NAME="Fedora Linux"
VERSION="36 (Workstation Edition)"
ID=fedora
VERSION_ID=36
VERSION_CODENAME=""
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Linux 36 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=36
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=36
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
SUPPORT_END=2023-05-16
VARIANT="Workstation Edition"
VARIANT_ID=workstation
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress