-
-
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
very basic: fetching string value/content without quotes #853
Comments
One thing I just noticed is that this could be a non-issue at all. In another code I'm working on, checking with gdb:
There weren't quotes. Only when I must be overlooking something very obvious. |
The type of |
You could also write std::string s = j["one"]; for an implicit conversion which avoids you writing |
Thank you both for the clarification. As a suggestion, it could be useful to include such an example in the usage tutorial, as
Output:
|
I added a clarification in the README file. |
I find this notation a bit ugly:
So I have been doing this:
As a suggestion, would you consider adding |
I would actually avoid adding such a function, because it the API is already bloated. You can write such a function yourself as it would not need to access private members. |
This is kind of a usage issue and not a bug/feature request. I could be overlooking something trivial as I am very new to the library; if this is the case, please point in the right direcion/documentation.
When printing/using a value from a string element, the string is quoted:
Printing/fetching
value
as opposed to"value"
.I understand that this could be a simple matter of picking out a substring, but searching in the documentation and existing issues (closed and open), I didn't find an idiomatic way of simply extracting the original string (no quotes as quotes are not escaped in the JSON blob).
GCC (7.2.0).
develop
branch?Git master, cc937de
The text was updated successfully, but these errors were encountered: