Exemplo n.º 1
0
    openWeatherJSONregexParserReturnableData parse() {
        if(regex_search(jsonData, resultate, skyPattern))
            data.sky = resultate.str(1);
        if(regex_search(jsonData, resultate, humidityPattern))
            data.humidity = resultate.str(1);
        if(regex_search(jsonData, resultate, windPattern))
            data.wind = resultate.str(1);
        if(regex_search(jsonData, resultate, tempPattern))
            data.temp = resultate.str(1);

        return data;
    }
Exemplo n.º 2
0
void test(std::smatch tokens)
{
    std::cout << "not implemented" << std::endl;
    for (size_t i = 0; i < tokens.size(); i++)
        std::cout << std::dec << i << " : " << tokens.str(i) << std::endl;
}