Is it possible to output an Enum's options as its string value rather than its int value?
<p>So, I have a class defined as such...</p>

<pre><code>public class Foo
{
    public Options Bar {get;set;}
}

public enum Options 
{
    Option1,
    Option2
}
</code></pre>

<p>When I use the JsonSchemaGenerator to generate its schema I get the following output...</p>

<pre><code>var generator = new JsonSchemaGenerator();
return generator.Generate(typeof(Foo), false);

{
  "type": "object",
  "properties" : {
      "Bar": {                 
          "type": "integer",
          "enum": [0,1]
       }
   }
}
</code></pre>

<p>I understand this is accurate, however I was wondering what's the most elegant way of outputting the Bar property as type string with its possible string values.  </p>

<p>I have tried the Json Attribute <strong>[JsonConverter(typeof(StringEnumConverter))]</strong> and it didn't seem to work.</p>