title: how to get newtonsoft to deserialize yes and no to boolean
body: <p>NOTE: I have provided the solution at the bottom of this feed.</p>
  
  <p>I have a C# Win 8 app where I'm de-serializing some json that looks like this:</p>
  
  <pre><code>{
      'Unit': [
          {
              'name':'House 123',
              isAvailable:'no'
          },
          {
              'name':'House 456',
              isAvailable:'yes'
          }]
  }
  </code></pre>
  
  <p>into a class that uses this interface:</p>
  
  <pre><code>public interface IUnit
  {
      string Name { get; }
      bool isAvailable { get; }
  }
  </code></pre>
  
  <p>But Newtonsoft throws an error: </p>
  
  <blockquote>
    <p>Unexpected character encountered while parsing value: n. Path
    'Unit[0].isAvailable, line 1, position 42.</p>
  </blockquote>
  
  <p>Is there a way to extend Newtonsoft to parse yes/no or 1/0 based on the resulting object property type of bool? Right now it only works for true/false.</p>
  
  <p>There are several posts on custom converters for classes, but not a primitive type like bool.</p>
  
  <p>Any suggestions?</p>