I am trying to open a file that is a json. and store it as an json object. : <p>I am trying to open a file that has a json extension and store it as an object.  However,  keep getting an error message that the file name was not declared in the scope.  I'm new to working with json files.  do you treat them differently than normal text files?  </p>

<pre><code>#include "json.hpp"
#include &lt;iostream&gt; 
#include &lt;stdio.h&gt; 
#include &lt;fstream&gt;
#include &lt;string&gt;


int main(int argc, char** argv) {

std::ifstream file;
file.open(test.json);
nlohmann::json jsonObject;
// Store the contents filename into jsonObject
if (file.is_open()) {
  file &gt;&gt; jsonObject;

}
file.close();

}
</code></pre>
