title: How to serialize a Map[CustomType, String] to JSON
body: <p>Given the following <code>Enumeration</code>...</p>
  
  <pre><code>object MyEnum extends Enumeration {
  
    type MyEnum = Value
  
    val Val1 = Value("val1")
    val Val2 = Value("val2")
    val Val3 = Value("val3")
  } 
  
  import MyEnum._
  </code></pre>
  
  <p>... and the following <code>Map</code>...</p>
  
  <pre><code>val m = Map(
    val1 -&gt; "one",
    val2 -&gt; "two",
    val3 -&gt; "three"
  )
  </code></pre>
  
  <p>... I need to transform <code>m</code> to JSON:</p>
  
  <pre><code>import play.api.libs.json._
  
  val js = Json.toJson(m)
  </code></pre>
  
  <p>The last statement doesn't compile because the compiler doesn't find a Json serializer for type <code>scala.collection.immutable.Map[MyEnum.Value,String]</code>.</p>
  
  <p>Question: Since Play does provide a serializer for type <code>scala.collection.immutable.Map[String,String]</code>, and my enumeration actually contains strings, is there a way to reuse the default JSON serializer?</p>