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

Fix issue#2086: disallow json::value_t type parameter in value() #2104

Merged
merged 1 commit into from
May 26, 2020

Conversation

dota17
Copy link
Contributor

@dota17 dota17 commented May 13, 2020

This patch fix issue #2086 by adding a type-error to disallow json::value_t type parameter in value() to avoid it returns empty object even if the key and its mapped value exist.

@dota17 dota17 requested a review from nlohmann as a code owner May 13, 2020 07:55
include/nlohmann/json.hpp Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented May 13, 2020

Coverage Status

Coverage remained the same at 99.94% when pulling cdf5327 on dota17:issue#2086 into d7b032f on nlohmann:develop.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann nlohmann linked an issue May 26, 2020 that may be closed by this pull request
@nlohmann nlohmann self-assigned this May 26, 2020
@nlohmann nlohmann added this to the Release 3.8.0 milestone May 26, 2020
@nlohmann nlohmann merged commit 3c60a66 into nlohmann:develop May 26, 2020
@nlohmann
Copy link
Owner

Thanks!

@nlohmann
Copy link
Owner


🔖 Release item

This issue/PR will be part of the next release of the library. This template helps preparing the release notes.

Type

  • ✨ New Feature
  • 🐛 Bug Fix
  • ⚡️ Improvement
  • 🔨 Further Change
  • 🔥 Deprecated function

Description


@dota17 dota17 deleted the issue#2086 branch May 26, 2020 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Value function return empty object even if it exist
3 participants