Skip to content

Support for integers not from the range [-(2**53)+1, (2**53)-1] in parser #291

Closed
@antonovvk

Description

Currently the test below fails:

TEST(WTF, BigInteger)  {
    nlohmann::json val = -3383556239975101330LL;
    val = nlohmann::json::parse(val.dump());
    EXPECT_EQ(-3383556239975101330, val.get<int64_t>());
}

And this is the internal inconsistency.
As far as I know, RFC does not require JSON integers to be in any range.
I think that internal consistency is more important than possible non-interoperability with third-party JSON parsers.

Metadata

Assignees

No one assigned

    Labels

    solution: invalidthe issue is not related to the library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions