Skip to content

Large numbers serialized incorrectly #41

Open

Description

@winseros

I have a lua object containing a large number:

local obj = {prop=1925036013156063406}

When the object is serialized, the JSON looks like:

{"prop":1.9250360131561e+18}

and can not be parsed by other JSON libraries on other programming languages.

The correct serializaion output would be:

{"prop":1925036013156063406}

Activity

  1. added a commit that references this issue on Nov 11, 2022
    15823a4
  2. aleksanderd commented on Nov 16, 2022

    @aleksanderd
  3. winseros commented on Nov 18, 2022

    @winseros
    Author

    @aleksanderd it works fine. I'll use it for now. Thank you!

  4. added 2 commits that reference this issue on Nov 20, 2022
    6006d0f
    7b07dc4
  5. vurvdev commented on Jun 29, 2023

    @vurvdev

    Indeed it could be serialized differently, however that is valid JSON. Whatever other library you are parsing it from does not follow the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions