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

Use json.Number instead of float64 when parsing state. #113

Merged
merged 5 commits into from
Dec 17, 2020
Merged

Commits on Dec 16, 2020

  1. Use json.Number instead of float64 when parsing state.

    State values can contain numbers that are larger than `float64` can
    precisely represent. `json.Unmarshal` when unmarshaled into an
    `interface{}` uses `float64` to represent numbers by default. To
    properly retain precision for numbers, we need to use a custom
    `json.Decoder` with the `UseNumber()` method called on it, which will
    use `json.Number` (a `string` alias) to store the numbers, preserving
    their precision.
    paddycarver committed Dec 16, 2020
    Configuration menu
    Copy the full SHA
    106c67f View commit details
    Browse the repository at this point in the history
  2. Update terraform-json.

    paddycarver committed Dec 16, 2020
    Configuration menu
    Copy the full SHA
    834cb4c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d95cbb1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3644a78 View commit details
    Browse the repository at this point in the history
  5. Ignore useJSONNumber in cmp.

    Fixes tests.
    paddycarver committed Dec 16, 2020
    Configuration menu
    Copy the full SHA
    6e1a977 View commit details
    Browse the repository at this point in the history