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

BoostJsonAdapter - false negative on isInteger() #170

Open
roosterfive opened this issue Jan 8, 2023 · 0 comments
Open

BoostJsonAdapter - false negative on isInteger() #170

roosterfive opened this issue Jan 8, 2023 · 0 comments

Comments

@roosterfive
Copy link

When a JSON value is constructed from an unsigned, BoostJsonValue#isInteger() returns a false negative as it
tests the value against is_int64() instead of (is_int64() || is_uint64()).

Only see this in unit tests as the tests validate against constructed values whereas values from parsed docs will construct same integer properties as int64_t.

Boost.JSON docs - "When a value is constructed from an unsigned integer, its kind will be kind::uint64. Likewise, a value constructed from a signed integer will have kind::int64." When parsed - "if the number is positive and its value is greater than INT64_MAX, then its type is std::uint64_t. All other numbers are parsed as std::int64_t"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant