-
Thanks for your work in making this library. I needed to parse a response from a web api, installed taocpp-json from Conan, read some documentation and accessed the data I needed no problems. Then I decided to experiment a bit more but when I try to use the 'to' member function I get the error in the commented code below. I grepped the whole json repo for 'to<' and 'to <' but found no examples. In the code I also comment with questions where I don't think I'm using the library correctly. I'd appreciate feedback.
I've uploaded the json example response but had to name it example.txt as json uploads are not supported - the irony! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
While For this reason the various |
Beta Was this translation helpful? Give feedback.
-
Checking whether |
Beta Was this translation helpful? Give feedback.
-
After adding the missing
|
Beta Was this translation helpful? Give feedback.
While
meta
is indeed astd::map< std::string, tao::json::value >
, so the iterators are the usual map iterators, the problem is thatv
is atao::json::value
which can hold an object (map
), an array (vector
), or one of the many other values, so there is no clear candidate for whattao::json::value::iterator
should be, and how it should behave.For this reason the various
tao::json::value::find()
functions return a pointer to atao::json::value
that isnullptr
when no appropriate sub-value was found (for objects the search key must be a string, for arrays the search…