title: Parsing issue warning with JSON
body: <p>I'm trying to read JSON data from a website. I'm using Dev C++ on Windows 10 with a mingw compiler. This is a JSON parser from a tutorial I'm trying to run in a static project: </p>
  
  <pre><code>#define CURL_STATICLIB
  #include &lt;cstdint&gt;
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  
  #include "curl.h"
  #include "json.h"
  
  namespace
  {
      std::size_t callback(
              const char* in,
              std::size_t size,
              std::size_t num,
              std::string* out)
      {
          const std::size_t totalBytes(size * num);
          out-&gt;append(in, totalBytes);
          return totalBytes;
      }
  }
  
  int main()
  {
      const std::string url("http://date.jsontest.com/");
  
      CURL* curl = curl_easy_init();
  
      // Set remote URL.
      curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
  
      // Don't bother trying IPv6, which would increase DNS resolution time.
      curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
  
      // Don't wait forever, time out after 10 seconds.
      curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10);
  
      // Follow HTTP redirects if necessary.
      curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  
      // Response information.
      int httpCode(0);
      // std::unique_ptr&lt;std::string&gt; httpData(new std::string());
  
      std::stringstream httpData;
  
      // Hook up data handling function.
      curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, callback);
  
      // Hook up data container (will be passed as the last parameter to the
      // callback handling function).  Can be any pointer type, since it will
      // internally be passed as a void pointer.
      curl_easy_setopt(curl, CURLOPT_WRITEDATA, &amp;httpData);
  
      // Run our HTTP GET command, capture the HTTP response code, and clean up.
      curl_easy_perform(curl);
      curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &amp;httpCode);
      curl_easy_cleanup(curl);
  
      if (httpCode == 200)
      {
          std::cout &lt;&lt; "\nGot successful response from " &lt;&lt; url &lt;&lt; std::endl;
  
          // Response looks good - done using Curl now.  Try to parse the results
          // and print them out.
          Json::Value jsonData;
          Json::CharReaderBuilder jsonReader;
          std::string errs;
  
          if (Json::parseFromStream(jsonReader, httpData, &amp;jsonData, &amp;errs))
              // jsonReader.parse(httpData, jsonData))
          {
              std::cout &lt;&lt; "Successfully parsed JSON data" &lt;&lt; std::endl;
              std::cout &lt;&lt; "\nJSON data received:" &lt;&lt; std::endl;
              std::cout &lt;&lt; jsonData.toStyledString() &lt;&lt; std::endl;
  
              const std::string dateString(jsonData["date"].asString());
              const std::size_t unixTimeMs(
                      jsonData["milliseconds_since_epoch"].asUInt64());
              const std::string timeString(jsonData["time"].asString());
  
              std::cout &lt;&lt; "Natively parsed:" &lt;&lt; std::endl;
              std::cout &lt;&lt; "\tDate string: " &lt;&lt; dateString &lt;&lt; std::endl;
              std::cout &lt;&lt; "\tUnix timeMs: " &lt;&lt; unixTimeMs &lt;&lt; std::endl;
              std::cout &lt;&lt; "\tTime string: " &lt;&lt; timeString &lt;&lt; std::endl;
              std::cout &lt;&lt; std::endl;
          }
          else
          {
              std::cout &lt;&lt; "Could not parse HTTP data as JSON" &lt;&lt; std::endl;
              std::cout &lt;&lt; "HTTP data was:\n" &lt;&lt; httpData.str() &lt;&lt; std::endl;
              return 1;
          }
      }
      else
      {
          std::cout &lt;&lt; "Couldn't GET from " &lt;&lt; url &lt;&lt; " - exiting" &lt;&lt; std::endl;
          return 1;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>And this is the error I've been getting: </p>
  
  <blockquote>
    <p>[Warning] 'Reader' is deprecated  (declared at
    C:/Users/me/Downloads/jsoncpp-master/jsoncpp-master/include/json/reader.h:35):
    | Use CharReader and CharReaderBuilder instead
    [-Wdeprecated-declarations]</p>
  </blockquote>
  
  <p>I figured the syntax was older, thus I swapped the object's terms for the recommended ones. Now I'm getting this error: 
  This was my corrected block: </p>
  
  <pre><code>Json::Value jsonData;
  Json::CharReaderBuilder CharReader;
  
  if (CharReader.parse(*httpData, jsonData))
  </code></pre>
  
  <p>And this is the new error: </p>
  
  <blockquote>
    <p>error: 'class Json::CharReaderBuilder' has no member named 'parse'
             if (CharReader.parse(*httpData, jsonData))</p>
  </blockquote>
  
  <hr>
  
  <p><strong>The above code corrects this. The particular issue has been corrected</strong>. 
  However, due to a library issue, this is my new errors when compiling. </p>
  
  <pre><code>g++.exe main.o -o CurlProject1.exe -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib" -L"C:/Users/me/Downloads/curl-7.56.1-win64-mingw/lib" -static-libgcc -L"C:/Users/me/Downloads/curl-7.56.1-win64-mingw/lib" ../../Downloads/curl-7.56.1-win64-mingw/lib/libcurl.a ../../Downloads/curl-7.56.1-win64-mingw/lib/libcurl.dll.a
  
  main.o:main.cpp:(.text+0x207): undefined reference to `Json::Value::Value(Json::ValueType)'
  main.o:main.cpp:(.text+0x213): undefined reference to `Json::CharReaderBuilder::CharReaderBuilder()'
  main.o:main.cpp:(.text+0x242): undefined reference to `Json::parseFromStream(Json::CharReader::Factory const&amp;, std::istream&amp;, Json::Value*, std::string*)'
  main.o:main.cpp:(.text+0x2a1): undefined reference to `Json::Value::toStyledString() const'
  main.o:main.cpp:(.text+0x2e8): undefined reference to `Json::Value::operator[](char const*)'
  </code></pre>