-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
json::parse(...) vs json j; j.parse(...) #357
Comments
In the upper example, you create a Again: |
The parse function is static. There is no such thing as calling it "on an object", except that C++ allows you to identify the static function to call using an object instead of the class name.
|
Heh, I saw @nlohmann's answer appear just as I clicked the Comment button. :) |
Same here, but Github claims I was 3 seconds faster ;) |
Ah, thank you. I had not noticed that it was a static method. |
I was wondering if there is a reason that a call to parse on a json object just returns a null json object? The same input seems to parse without issue using the jason::parse call.
For example the following program:
Results in (osx):
The text was updated successfully, but these errors were encountered: