-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
solution: wontfixthe issue will not be fixed (either it is impossible or deemed out of scope)the issue will not be fixed (either it is impossible or deemed out of scope)
Description
-
What is the issue you have?
map<json::value_t, string>exhibits unexpected behavior -
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
#include <iostream>
#include <json.hpp>
using namespace std;
using nlohmann::json;
static map<json::value_t, string> nlohmann_to_openapi {
{json::value_t::null, "null"},
{json::value_t::boolean, "boolean"},
{json::value_t::string, "string"},
{json::value_t::number_integer, "integer"},
{json::value_t::number_unsigned, "integer"},
{json::value_t::number_float, "number"},
{json::value_t::object, "object"},
{json::value_t::array, "array"}
};
int main()
{
cout << nlohmann_to_openapi.at(json::value_t::number_float) << endl;
}
-
What is the expected behavior?
"number" -
And what is the actual behavior instead?
"integer" -
Which compiler and operating system are you using? Is it a supported compiler?
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
Ubuntu 18.04 -
Did you use a released version of the library or the version from the
developbranch?
Tried various official released as well as the latest on master -
If you experience a compilation error: can you compile and run the unit tests?
n/a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
solution: wontfixthe issue will not be fixed (either it is impossible or deemed out of scope)the issue will not be fixed (either it is impossible or deemed out of scope)