-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Where is json::parse now? #1702
Comments
In order to asses your issue, we need the following information:
|
|
|
#include <iostream>
#include "nlohmann/json.hpp"
using json = nlohmann::json;
using namespace std;
int main()
{
json j;
return 0;
} |
Strange... Can you please try: std::string s = "{ \"happy\": true, \"pi\": 3.141 }";
json j = json::parse(s); ? |
I have the same exact behaviour in Visual Studio 2019, using the single include file. |
Oh, @pmahend1 - does the code compile or is it just an IntelliSense error? |
This fails :Compilation error Running tests --> I am getting |
What is the exact compilation error message? |
Please ignore. This is intellisense issue. Seems something went wrong with latest visual studio 16.2.1 |
Thanks! |
So the only solution is to wait for a new build of VS and keep editor errors while developing? |
I would not know any other way. |
@erap320 - You might also want to report to Visual Studio at https://developercommunity.visualstudio.com/spaces/62/index.html. |
I have reported on developer community |
Yup, still getting this error on visual studio 2019 16.2.3. |
Maybe fixed with #1799. |
@nlohmann Not really. |
Turns out the error will be fixed in VS 2019 16.4. Right now it's only available as preview version. You can download and install it from here. Although I wouldn't use it for serious development. If you need proof: So to problem is really caused by VS and not the library itself. The problem was previously reported on the developper comunity |
@Stefmachine Thanks a lot for checking! |
currently using 16.6.3 version of visual studio, and i get the same issue. gr |
See #1702 (comment) |
Trying to parse a string into json and then extract values and create object
Getting error class
"nlohmann::basic_json<std::map, std::vector, std::string, bool, int64_t, uint64_t, double, std::allocator, nlohmann::adl_serializer>" has no member "parse"
Windows 10
VCPKG
The text was updated successfully, but these errors were encountered: