I can receive the JSON result successfully and printing it to the console (as per the online samples), but I am have problems extracting actual field data. How can I extract individual fields as numbers, string, etc? I've tried various forms of casting, but this is what I have at the moment (trying to extract the status value):
The Number casting is producing compiler errors. I guess I could convert the object to a string, and then using a third party JSON parser to extract individual fields, but this seems very wasteful. asked 17 Sep '15, 18:19 winwaed |
With help from Daniel Hofman on the OSM listserver, I've managed to find the mapbox::util::get call, eg:
(in this example, status only contains integer values, so it should also be rounded to an integer) I think I need to read up on boost :-) answered 21 Sep '15, 17:53 winwaed |