title: services AddJsonOptions .net core 2.1
body: <p>Previously with .net 2.0, you can add json stuffs this way</p>
  
  <pre><code> services.AddJsonOptions(options =&gt; {
                      options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
                      options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
              });
  </code></pre>
  
  <p>or </p>
  
  <pre><code>services.AddMvc().AddJsonOptions(options =&gt; {
                      options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
                      options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
              });
  </code></pre>
  
  <p>I realize I can't do the same thing with .net 2.1.</p>
  
  <p>I get this error:</p>
  
  <pre><code>'IServiceCollection' does not contain a definition for 'AddJsonOptions'
  and the best extension method overload 'MvcJsonMvcBuilderExtensions.AddJsonOptions(IMvcBuilder, Action&lt;MvcJsonOptions&gt;)' 
  requires a receiver of type 'IMvcBuilder
  </code></pre>
  
  <p>Anyone have a solution?</p>