You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this hasn't been asked before (i did try searching through past issues and SO for this), but I was wondering if the library offers some functionality to parse numbers in json files that are quoted, for e.g.
{"a" : "5"}
I tried something like int mynumber = j.at("a").get<int>() but i get a runtime error saying that it expected a string. Is there some other function to use or do i have to extract it as a string first and then convert it to an integer myself elsewhere?
Thanks!
The text was updated successfully, but these errors were encountered:
I hope this hasn't been asked before (i did try searching through past issues and SO for this), but I was wondering if the library offers some functionality to parse numbers in json files that are quoted, for e.g.
I tried something like
int mynumber = j.at("a").get<int>()
but i get a runtime error saying that it expected a string. Is there some other function to use or do i have to extract it as a string first and then convert it to an integer myself elsewhere?Thanks!
The text was updated successfully, but these errors were encountered: