Converting enum values to arbitrary integers when using Newtonsoft.Json
<p>I have an enum:</p>

<pre><code>public enum IdleDelayBreakMode
{
    Repeat,
    ShowNext
}
</code></pre>

<p>I'm using <code>NewtonSoft.Json</code> to convert to json objects containing properties of that enum's type. What's the best solution to serialize values of that enum to arbitrary integers? Ideally i would like to do something like on the snippet below and i want to know if maybe there's a built-in solution for that:</p>

<pre><code>public enum IdleDelayBreakMode
{
    [JsonValue(100)]
    Repeat,             // When serializing will be converted to 100

    [JsonValue(200)]
    ShowNext            // When serializing will be converted to 200  
}
</code></pre>