access to object array

  • flashpixx

    flashpixx - 2012-07-06


    I try to read the trend values of twitter (see )
    I have got access to the "list" of the trends values (eg items with the object name "2012-07-06 10:00").

    This is a short code excerpt:

    Json::Value l_trends = l_resultroot["trends"];
    for(std::size_t i=0; i < l_trends.size(); ++i) {
         do something on each "date object"

    If I try to get access with


    I get the assertion error:
    Assertion failed: (type_ == nullValue || type_ == arrayValue), function operator, file src/lib_json/json_value.cpp, line 977.

    In which way can I get access to the "date objects" ?

  • flashpixx

    flashpixx - 2012-07-06

    the second code line should be

  • flashpixx

    flashpixx - 2012-07-06

    sorry, I must add some spaces in the code line, because otherwise the index operator is removed

    l_trend [ i ]
  • RDS

    RDS - 2012-07-09

    trends seems to be "Object Type". Use Json::ValueIterator for iterating over individual member/entry in the object.


Log in to post a comment.