title: How to differentiate between "true" and boolean true in YamlDotNet
body: <p>I have a class with a <code>dynamic</code> member. When the value is a boolean, it's serialized as <code>true / false</code> which deserializes to a string. Is this an issue with YamlDotNet, or if not, how can I force it to serialize as <code>true</code> rather than <code>"true"</code>?</p>
  
  <p>This is a class I'm trying to serialize</p>
  
  <pre><code>public class Field : IField
  {
      public string MachineName { get; set; }
      public string DisplayName { get; set; }
      public FieldFormatterEnum FormatterType { get; set; }
      public dynamic Value { get; set; }
      public dynamic DefaultValue { get; set; }
      public dynamic FormattedValue { get; set; }
      ...
  }
  </code></pre>
  
  <p>The typed deserializer method:</p>
  
  <pre><code>    public T DeserializeObject&lt;T&gt;(string input)
      {
          T o;
          using (var tr = new StringReader(input))
          {
              o = new Deserializer().Deserialize&lt;T&gt;(tr);
          }
          return o;
      }
  </code></pre>
  
  <p>Field is in a <code>List</code> in another class which is being serialized / deserialized.</p>
  
  <hr>
  
  <p>Update: After looking at the serialized output, YamlDotNet outputs the serialized boolean as <code>true</code> and not <code>"true"</code>. So.. I'm guessing it's a problem with the deserialization code in YamlDotNet?</p>