google / google/jsonnet

Round-trip failure with certain unsigned int64 values

Open
#1,264 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jsonnet
Stars
7.6k
Forks
475
PR merge metrics
No merged PRs in 30d

Description

Jsonnet produces surprising output for certain unsigned int64 values. For example, with this `test.jsonnet`:

```
{
a_uint: 18446744073709551615,
b_uint: 9223372036854775807
}
```

`jsonnet test.jsonnet` produces this output:

```
{
"a_uint": 18446744073709551616,
"b_uint": 9223372036854775808
}
```

Tagging Framework-R-D/phlex#243.

EDIT: Evidently this is because *all* numbers are 64-bit floats in Jsonnet.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.