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

Value method with undocumented throwing 302 exception #1601

Closed
lohmanndouglas opened this issue May 15, 2019 · 4 comments
Closed

Value method with undocumented throwing 302 exception #1601

lohmanndouglas opened this issue May 15, 2019 · 4 comments
Assignees
Labels
documentation release item: 🔨 further change solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Milestone

Comments

@lohmanndouglas
Copy link

I am using value function and I did not figure out if this should be the correct behavior according to the documentation.

The following code terminate called after throwing an instance of [json.exception.type_error.302] type must be string, but is number.

Should I add this throwing to the docs?

int main() 
{
    json json_types =
    {
        {"MyString", "Hello, world!"},
        {"MyInt", 123}
    };   
    std::string string_id;
    json_types.value("MyInt", string_id);
} 
@stale
Copy link

stale bot commented Jun 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Jun 14, 2019
@nlohmann nlohmann added documentation and removed state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated labels Jun 15, 2019
@nlohmann
Copy link
Owner

@nlohmann nlohmann self-assigned this Jun 22, 2019
@nlohmann nlohmann added release item: 🔨 further change solution: proposed fix a fix for the issue has been proposed and waits for confirmation labels Jun 22, 2019
@nlohmann nlohmann added this to the Release 3.6.2 milestone Jun 22, 2019
@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

  • Completed documentation of value() function with respect to type_error.302 exception.

@nlohmann
Copy link
Owner

Thanks for reporting! The documentation will be updated with the next release.

@nlohmann nlohmann modified the milestones: Release 3.6.2, Release 3.7.0 Jul 9, 2019
@nlohmann nlohmann added this to the Release 3.7.0 milestone Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation release item: 🔨 further change solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants