title: How to read multiple json objects using jsoncpp
body: <p>I have a sample file "sample.json" which contains 3 json objects</p>
  
  <p>{"A":"something1","B":"something2","C":"something3","D":"something4"}{"A":"something5","B":"something6","C":"something7","D":"something8"}{"A":"something9","B":"something10","C":"something11","D":"something12"}</p>
  
  <p>(there is no newline in above file)</p>
  
  <p>I want to read all three json objects using jsoncpp.</p>
  
  <p>I'm able to read the first object but not after it.</p>
  
  <p>Here is relevant portion of my code</p>
  
  <pre><code>    Json::Value root;   // will contains the root value after parsing.
      Json::Reader reader;
      std::ifstream test("sample.json", std::ifstream::binary);
      bool parsingSuccessful = reader.parse(test, root, false);
      int N = 3;
      if (parsingSuccessful)
      {
           for (size_t i = 0; i &lt; N; i++)
           {
                  std::string A= root.get("A", "ASCII").asString();
                  std::string B= root.get("B", "ASCII").asString();
                  std::string C= root.get("C", "ASCII").asString();
                  std::string D= root.get("D", "ASCII").asString();
                 //print all of them
          }
      }
  </code></pre>