Delete childer node

Help
Anonymous
2012-06-30
2013-06-12
  • Anonymous - 2012-06-30

    Hi.
    I can't delete childer node.

    JSONNode::json_iterator session = n.find_nocase("session");
    n.erase(session->begin(), session->end() + 1);
    

    It doesn't work, if session is childern node. For example.
    {
      "session" : "ttttt"
    }
    Here It works.

    But here doesn't work.
    {
      "point" : {
           "session" : "ttttt"
      }
    }

    Please, help me.
    Thanks.

     
  • Anonymous - 2012-06-30

    Sorry, I wrote nonsense.
    My code islike this.

    JSONNode::json_iterator session = n.find_nocase("session");
    n.erase(session, session + 1);
    
     
  • Jonathan Wallace

    I will have to look into it, are you sure session+1 is a valid address.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks