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

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

Closed
antonovvk opened this issue Aug 11, 2016 · 2 comments
Closed
Labels
solution: invalid the issue is not related to the library

Comments

@antonovvk
Copy link

antonovvk commented Aug 11, 2016

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.

@antonovvk
Copy link
Author

Sorry, I was using v1.1.0 and haven't noticed that this is fixed in newer versions.
Thank you for the great lib!

@nlohmann nlohmann added the solution: invalid the issue is not related to the library label Aug 11, 2016
@nlohmann
Copy link
Owner

No problem - when I saw the title, I though "Man, didn't we already fix this?" ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: invalid the issue is not related to the library
Projects
None yet
Development

No branches or pull requests

2 participants