title: How to force DotNetCore 2.1 Web API to output Json format? What library do I need?
body: <p>I be straight to the point. I am in the process of converting ASP.Net web services into  DotNetCore 2.1 services. My question is very simple. How do I get json output from a string (with a GET verb)?
  I'm new at this, but almost every piece of documentation and recommendations do not work with DotNetCore.</p>
  
  <p>Obviously, the following will not work:</p>
  
  <pre><code>[HttpGet]
  public string Get()
  {
      return "{\"country_code\":\"US\",\"country_name\":\"United States\",\"region_name\":\"California\",\"city_name\":\"Los Angeles\",\"latitude\":\"34.052230\",\"longitude\":\" - 118.243680\",\"zip_code\":\"90001\",\"time_zone\":\" - 08:00\"}";
  }
  </code></pre>
  
  <p>I just need to convert this string (or tell the client) that I want the output in json. The following does not work either - got a squiggly line under the "Json(" method and, for the life of me, can't find a reference to make it go away (I pulled it from an example, so they must be using a 3rd party json parsing library or there's a reference that I'm missing) </p>
  
  <pre><code>[HttpGet]
  public JsonResult Get()
  {
      return Json("{\"country_code\":\"US\",\"country_name\":\"United States\",\"region_name\":\"California\",\"city_name\":\"Los Angeles\",\"latitude\":\"34.052230\",\"longitude\":\" - 118.243680\",\"zip_code\":\"90001\",\"time_zone\":\" - 08:00\"}", "application/json"); 
  }
  </code></pre>
  
  <p>Ideally, I'd like to serialize an object to json, but figured I'd start with something ridiculously simple. 
  Anywho, if anyone can help.</p>