title: How to read .JSON from embedded resource C#
body: <p>I'm trying to read in a JSON file from an embedded resource.
  I've tried looking online but most questions are about .txt files that aren't helping.</p>
  
  <p>I've already tried making the json file an embedded resource but that hasn't helped either.</p>
  
  <pre><code>var assembly = Assembly.GetExecutingAssembly();
  var resourceName = "MyLibrary.Properties.Resources.MyJson.json";
  
  using (Stream stream = assembly.GetManifestResourceStream(resourceName))
  using (StreamReader reader = new StreamReader(stream))
  {
      string jsonFile = reader.ReadToEnd(); //Make string equal to full file
  }
  </code></pre>
  
  <p>When this code is run, I get the following error: System.ArgumentNullException: 'Value cannot be null. Parameter name: stream'</p>